Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order ID not getting with Payment Link #372

Open
jishadp opened this issue Feb 20, 2024 · 0 comments
Open

Order ID not getting with Payment Link #372

jishadp opened this issue Feb 20, 2024 · 0 comments

Comments

@jishadp
Copy link

jishadp commented Feb 20, 2024

Steps to reproduce the behavior

Create a payment link with $api->paymentLink->create([]); and fetch the link with $order = $api->paymentLink->fetch($response->id);

Expected behavior

Order ID should get in response

Actual behavior

The order ID is not getting in this response.

Code snippets

`$booking = Booking::find($event->booking->id);

        $api = new Api($apiKey, $apiSecret);

        $response = $api->paymentLink->create([
            'amount'=>10000,
            'currency'=>'INR',
            'expire_by' => strtotime('+18 minutes', time()),
            'reference_id' => $booking->reference."_".time(),
            'description' => 'KarCare Payment for '.$booking->reference,
            'customer' => [
                'name'=>'KarCare User',
                'email' => '[email protected]',
                'contact'=>'+91'.$booking->user->mobile],
                'notify'=>
                ['sms'=>true, 'email'=>true] ,
            'reminder_enable'=>true ,
            'notes'=>['policy_name'=> 'KarCare'],
            'callback_url' => env('FE_URL').'my-bookings',
            'callback_method'=>'get'
        ]);
        info(collect($response));
        $booking->update([
            'razorpay_payment_link' => $response->short_url,
        ]);
        $order = $api->paymentLink->fetch($response->id);
        info(collect($order));`

Php version

8.3

Library version

"razorpay/razorpay": "^2.9",

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant