Skip to the content
Free express worldwide shipping.
Subscribe to discover
Cart
0
Shopping Bag
No products in the cart.
Engagement Collection
Engagement BANDS
Engagement RINGS
RING
BRACELET
EARRING
NECKLACE
PENDANT
Cart
0
Shopping Bag
No products in the cart.
Engagement Collection
Engagement BANDS
Engagement RINGS
RING
BRACELET
EARRING
NECKLACE
PENDANT
Home
Payment
'https://bobsal.gateway.mastercard.com/api/rest/version/73/merchant/'.$merchant_id.'/session', CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => false, CURLOPT_POST => true, CURLOPT_POSTFIELDS => '{ "apiOperation": "INITIATE_CHECKOUT", "checkoutMode": "PAYMENT_LINK", "interaction": { "operation": "PURCHASE", "merchant": { "name" : "Your Merchant Name", } }, "order": { "currency" : "'.$currency.'", "currency": "USD", "id": "EBOOKINV-'.$order_id.'", "amount": '.$amount.', "description": " " }, "billing": { "address": { "company": "'.$company_name.'" } }, "customer": { "firstName": "'.$ClientName.'" }, "paymentLink": { "expiryDateTime": "'.$expiry_date.'", "numberOfAllowedAttempts": "3" } }' , CURLOPT_HTTPHEADER =>array( 'Authorization: Basic ' . base64_encode("$username:$password").'' ), )); // Execute the CURL request to request a hosted checkout session $response = curl_exec($curl); $r=json_decode($response); $error = curl_error($curl); $http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE); // Close the CURL session curl_close($curl); // Check for CURL errors if ($error) { echo "CURL Error: " . $error; } else { // Check for HTTP errors if ($http_code >= 400) { echo "HTTP Error: " . $http_code; } else { // Parse the response JSON and extract the session ID $response_obj = json_decode($response); $Payment_Link = $response_obj->paymentLink->url; // Use the session ID in the HTML page to display the hosted checkout page ?>
Payment Link
Payment Link
Copy