Php instamojo如何在HP中传递自定义字段
我正在尝试在我的网站上集成instamojo支付网关Php instamojo如何在HP中传递自定义字段,php,mysql,instamojo,Php,Mysql,Instamojo,我正在尝试在我的网站上集成instamojo支付网关 $product_name = "Buy Wine"; $price = $sub_total; $name = $_POST['f_name'].' '.$_POST['l_name']; $phone = $_POST['phone']; $email = $_POST['email']; include 'src/instamojo.php'; $api = new Insta
$product_name = "Buy Wine";
$price = $sub_total;
$name = $_POST['f_name'].' '.$_POST['l_name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
include 'src/instamojo.php';
$api = new Instamojo\Instamojo('api_key', 'auth_token','https://test.instamojo.com/api/1.1/');
try {
$response = $api->paymentRequestCreate(array(
"purpose" => $product_name,
"amount" => $price,
"buyer_name" => $name,
"phone" => $phone,
"send_email" => true,
"send_sms" => true,
"email" => $email,
'allow_repeated_payments' => false,
"redirect_url" => "http://trezeefoods.com/thankyou.php",
"webhook" => "http://trezeefoods.com/webhook.php"
));
//print_r($response);
$pay_ulr = $response['longurl'];
//Redirect($response['longurl'],302); //Go to Payment page
header("Location: $pay_ulr");
exit();
}
catch (Exception $e) {
print('Error: ' . $e->getMessage());
}
在这里,我试图在成功页面上传递产品id作为响应,如
"order_id" => 1234,
但我无法在成功页面上收到此消息您可以通过url参数将其传递到重定向url谢谢selvan。我将在这方面的工作和更新you@JotheesP它有效吗?你可以用url参数将它传递到重定向url谢谢selvan。我将在这方面的工作和更新you@JotheesP它有效吗?