PHP code example of lakshmaji / razorpay

1. Go to this page and download the library: Download lakshmaji/razorpay library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lakshmaji / razorpay example snippets


Lakshmaji\Razorpay\RazorpayServiceProvider::class,

'Razorpay' => Lakshmaji\Razorpay\Facade\Razorpay::class,



use Razorpay;

protected $request;
protected $razorpay;

public function __construct(
    Request $request,
    Razorpay $razorpay
) {
    // Set the properties
    $this->request = $request;
    $this->razorpay = $razorpay;
}

	$this->razorpay->getPaymentDetails($paymentId);

	$this->razorpay->getPaymentDetails($paymentId, ['amount' => 500]);
bash
    php artisan vendor:publish