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

I am getting invalid checksum error on production API #69

Open
musawershah1598 opened this issue Aug 24, 2021 · 4 comments
Open

I am getting invalid checksum error on production API #69

musawershah1598 opened this issue Aug 24, 2021 · 4 comments

Comments

@musawershah1598
Copy link

I had integrated paytm with your package and it was working fine when integrated with test API key, but when I changed the API key from test to production it is giving me invalid checksum laravel page error. Below is the code I had used

$uuid = Str::uuid()->toString();
$payment = PaytmWallet::with('receive');
$payment->prepare([
  'order' => $uuid,
  'user' => $order->user_id,
  'mobile_number' => $order->phone,
  'email' => $order->email,
  'amount' => $order->total,
  'callback_url' => route('payment.callback'),
]);
return $payment->receive();

And for callback function used below code

$transaction = PaytmWallet::with('receive');
$response = $transaction->response();
if($transaction->isSuccessful()){
          //Transaction Successful
    return view("pages.payments.success",compact("layout"));
}else if($transaction->isFailed()){
          //Transaction Failed
    return view("pages.payments.failed",compact("layout"));
}else if($transaction->isOpen()){
          //Transaction Open/Processing
    return view("pages.payments.failed",compact("layout"));
}
@kaydee123
Copy link

I am Having this issue too

@kaydee123
Copy link

php artisan config:cache fixed it

@musawershah1598
Copy link
Author

@kaydee123 I am sorry but php artisan config:cache didn't fixed my issue.

@piyushmanolkar
Copy link

Please check types of your fields in $payment->prepare(), I had the same problem, Had to match the type with the types in documentation - https://business.paytm.com/docs/api/initiate-transaction-api/?ref=payments, For example I was passing amount as int, it has to be float.

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

3 participants