"Untitled"
Bootstrap 4.1.1 Snippet by Aaditya1

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <?php /* * import checksum generation utility * You can get this utility from https://developer.paytm.com/docs/checksum/ */ require_once("PaytmChecksum.php"); $paytmParams = array(); $paytmParams["body"] = array( "mid" => "YOUR_MID_HERE", "linkType" => "GENERIC", "linkDescription" => "Test Payment", "linkName" => "Test", ); /* * Generate checksum by parameters we have in body * Find your Merchant Key in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys */ $checksum = PaytmChecksum::generateSignature(json_encode($paytmParams["body"], JSON_UNESCAPED_SLASHES), "YOUR_MERCHANT_KEY"); $paytmParams["head"] = array( "tokenType" => "AES", "signature" => $checksum ); $post_data = json_encode($paytmParams, JSON_UNESCAPED_SLASHES); /* for Staging */ $url = "https://securegw-stage.paytm.in/link/create"; /* for Production */ // $url = "https://securegw.paytm.in/link/create"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); $response = curl_exec($ch); print_r($response);

Related: See More


Questions / Comments: