">
" alt="Merchant Logo" class="merchant-logo">
$username, "password" => $password ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($requestData)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Content-Type: application/json", "x-hash: $xHash" ]); $response = curl_exec($ch); curl_close($ch); $responseData = json_decode($response, true); if($responseData['token'] == null){ ?> location.href="'.pp_get_paymentlink($responseData['ValueA']).'";'; } }else{ ?> $username, "password" => $password ]; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($requestData)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Content-Type: application/json", "x-hash: $xHash" ]); $response = curl_exec($ch); curl_close($ch); $responseData = json_decode($response, true); if($responseData['token'] == null){ ?> $storeId, "CustomerOrderId" => $customerOrderId, "merchantTransactionId" => $merchantTransactionId, "transactionTypeId" => 1, // 1 = Web "financialEntityId" => 0, "transitionStatusId" => 0, "totalAmount" => $transaction_amount, "ipAddress" => $_SERVER['REMOTE_ADDR'], "version" => "1", "successUrl" => getCurrentUrl() . $separator . "ppstatus=success", "failUrl" => getCurrentUrl() . $separator . "ppstatus=cancel", "cancelUrl" => getCurrentUrl() . $separator . "ppstatus=cancel", "customerName" => $transaction_details['response'][0]['c_name'], "customerEmail" => $cust_email, "CustomerAddress" => "Uttara, Dhaka-1230", "CustomerAddress2" => "Uttara, Khulna-123011", "CustomerCity" => "Khulna", "CustomerState" => "Khulna", "CustomerPostcode" => "12301", "CustomerCountry" => "BD", "CustomerPhone" => $cust_phone, "ShipmentName" => "ABC", "ShipmentAddress" => "Address", "ShipmentAddress2" => "Address", "ShipmentCity" => "City Name", "ShipmentState" => "State Name", "ShipmentPostcode" => "1230", "ShipmentCountry" => "BD", "ValueA" => $payment_id, "ValueB" => "", "ValueC" => "", "ValueD" => "", "ShippingMethod" => "NO", "NoOfItem" => "1", "ProductName" => "Candy", "ProductProfile" => "general", "ProductCategory" => "Demo", "ProductList" => [ [ "ProductName" => "Productname1", "NoOfItem" => "2", "ProductProfile" => "ProductProfile1", "ProductCategory" => "ProductImageURl", "ProductPrice" => "105" ] ] ]; // Step 3: Send POST request to EPS Initialize API $url = $base_url."/v1/EPSEngine/InitializeEPS"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload)); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Content-Type: application/json", "x-hash: $xHash", "Authorization: Bearer $token" ]); $response = curl_exec($ch); curl_close($ch); // Parse and show result $responseData = json_decode($response, true); // Optional: Redirect to payment page if (!empty($responseData['RedirectURL'])) { echo ''; }else{ ?>