anandsiddharth / laravel-paytm-wallet

Integrate paytm wallet in your laravel application easily with this package. This package uses official Paytm PHP SDK's.
MIT License
92 stars 40 forks source link

How to send custom values? #59

Open arunk9034 opened 3 years ago

arunk9034 commented 3 years ago

How can I send 3-4 custom fields to paytm and get them back with response, i tried with below code to send some userdata in userinfo variable.

$payment->prepare([ 'order' => $id, // your order id taken from cart 'user' => Auth::user()->id, // your user id 'mobile_number' => $mobile, // your customer mobile no 'email' => $email, // your user email address 'amount' => $request['amount'], // amount will be paid in INR. "userInfo" => array( "custId" => Auth::user()->id, ), 'callback_url' => url('/').$callback // callback URL ]);