Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 784 Bytes

README.md

File metadata and controls

35 lines (27 loc) · 784 Bytes

Laravel Razorpay Integration with Inertia, React and Typescript.

  1. Install Razorpay SDK:
composer require razorpay/razorpay
  1. Create Model, Controller, Migration, Service, etc.
  2. Update your .env with the following values.
# Razorpay
RAZORPAY_KEY=
RAZORPAY_SECRET=
  1. Open config/services.php and add the below at the end of the array.
    'razorpay' => [
        'key' => env('RAZORPAY_KEY', ''),
        'secret' => env('RAZORPAY_SECRET', ''),
    ],
  1. Have your routes like this.
    // Payment
    Route::post('/create-order', [PaymentController::class, 'createOrder']);
    Route::post('/verify-payment', [PaymentController::class, 'verifyPayment']);

Author: