allow vendord
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
This commit is contained in:
32
vendor/paytm/paytmchecksum/sample.php
vendored
Normal file
32
vendor/paytm/paytmchecksum/sample.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
require_once("./PaytmChecksum.php");
|
||||
|
||||
/* initialize an array */
|
||||
$paytmParams = array();
|
||||
|
||||
/* add parameters in Array */
|
||||
$paytmParams["MID"] = "YOUR_MID_HERE";
|
||||
$paytmParams["ORDERID"] = "YOUR_ORDERID_HERE";
|
||||
|
||||
/**
|
||||
* Generate checksum by parameters we have
|
||||
* Find your Merchant Key in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys
|
||||
*/
|
||||
$paytmChecksum = PaytmChecksum::generateSignature($paytmParams, 'YOUR_MERCHANT_KEY');
|
||||
$verifySignature = PaytmChecksum::verifySignature($paytmParams, 'YOUR_MERCHANT_KEY', $paytmChecksum);
|
||||
echo sprintf("generateSignature Returns: %s\n", $paytmChecksum);
|
||||
echo sprintf("verifySignature Returns: %b\n\n", $verifySignature);
|
||||
|
||||
|
||||
/* initialize JSON String */
|
||||
$body = "{\"mid\":\"YOUR_MID_HERE\",\"orderId\":\"YOUR_ORDER_ID_HERE\"}";
|
||||
|
||||
/**
|
||||
* Generate checksum by parameters we have in body
|
||||
* Find your Merchant Key in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys
|
||||
*/
|
||||
$paytmChecksum = PaytmChecksum::generateSignature($body, 'YOUR_MERCHANT_KEY');
|
||||
$verifySignature = PaytmChecksum::verifySignature($body, 'YOUR_MERCHANT_KEY', $paytmChecksum);
|
||||
echo sprintf("generateSignature Returns: %s\n", $paytmChecksum);
|
||||
echo sprintf("verifySignature Returns: %b\n\n", $verifySignature);
|
||||
Reference in New Issue
Block a user