I want to integrate paytm payment gateway in php

97 Views Asked by At

I want to generate a checksum and match the Paytm payment utility checksum using PHP

for more read this documentation installing the Paytm Checksum utility with the composer

https://business.paytm.com/docs/checksum/

I have installed the Paytm Checksum utility using the command in php

composer require paytm/paytmchecksum

I'm including a PHP class with

require_once("./vendor/Paytm/paytmchecksum/paytmchecksum/paytmchecksum.php");

but when the code is executed I receive this error:


Fatal error: Uncaught Error: Class "PaytmChecksum" not found in C:\xampp\htdocs\checksum\checksum_gen.php:18 Stack trace: #0 {main} thrown in C:\xampp\htdocs\checksum\checksum_gen.php on line 18

I still can't figure out what's the problem. I'm 99% sure it's incorrect.

No solution has been found yet

checksum_gen.php

$paytmChecksum = PaytmChecksum::generateSignature($body, 'YOUR_MERCHANT_KEY');
echo sprintf("generateSignature Returns: %s\n", $paytmChecksum);
0

There are 0 best solutions below