">
" alt="Merchant Logo" class="merchant-logo">
($settings['nagad_mode'] ?? 'sandbox') === 'sandbox' ? 'development' : 'production', 'NAGAD_APP_LOG' => '1', 'NAGAD_APP_ACCOUNT' => $settings['nagad_app_account'], //demo 'NAGAD_APP_MERCHANTID' => $settings['nagad_merchant_id'], //demo 'NAGAD_APP_MERCHANT_PRIVATE_KEY' => $settings['nagad_private_key'], 'NAGAD_APP_MERCHANT_PG_PUBLIC_KEY' => $settings['nagad_public_key'], 'NAGAD_APP_TIMEZONE' => 'Asia/Dhaka', ]; $method = $_GET['method'] ?? ''; $merchant = '--'; if (strpos($method, '?') !== false) { parse_str(parse_url($method, PHP_URL_QUERY), $method_params); if (isset($method_params['merchant'])) { $merchant = $method_params['merchant']; } } if ($merchant !== "--") { $uri = $_SERVER['REQUEST_URI']; $protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://"; $responseUrl = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $responseArray = Helper::successResponse($responseUrl); if (isset($responseArray['payment_ref_id'], $responseArray['status']) && $responseArray['status'] == "Success") { $helper = new Helper($config); try { $response = $helper->verifyPayment($responseArray['payment_ref_id']); $buffer = json_decode($response, true); if (isset($buffer['status']) && $buffer['status'] =='Success'){ $parts = explode("QPL", $buffer['orderId']); $order_id = $parts[1]; $check_transactionid = pp_check_transaction_exits($buffer['issuerPaymentRefNo']); if($check_transactionid['status'] == false){ if(pp_set_transaction_byid($payment_id, $plugin_slug, $plugin_info['plugin_name'], $buffer['clientMobileNo'], $buffer['issuerPaymentRefNo'], 'completed')){ echo ''; } }else{ ?>
Transaction ID already exits
Transaction
getMessage();?>
Transaction
20) { $final = substr($combined, strpos($combined, 'QPL') + 1, 20); } else { $final = $combined; } $final = substr($final, 0, 20); $nagad = new Base($config, [ 'amount' => $transaction_amount, 'invoice' => $final, 'merchantCallback' => getCurrentUrl(), ]); $status = $nagad->payNow($nagad); } catch (\Xenon\NagadApi\Exception\ExceptionHandler $e) { ?>
Invalid Data