instamojo支付门在服务器中的实现方式

时间:2017-05-10 09:18:46

标签: php

我们在我们的网站上使用instamojo支付门方式,它在localhost中成功运行但在实时服务器(godady)中却没有像500那样的错误(页面无效)。请问你可以建议我解决我的问题  我们正在使用下面的代码

<?php 
$product_name=$_POST['product_name'];
$price=$_POST['product_price'];
$name=$_POST['name'];
$phone=$_POST['phone'];
$email=$_POST['email'];
include 'src/instamojo.php';
$api = new Instamojo\Instamojo('a9979a24478f77cf21688ca8a8f46151', '025caf249cec5ad8345192a15e71602b');


try {
    $response = $api->paymentRequestCreate(array(
        "purpose" => $product_name,
        "amount" => $price,
        "buyer_name" => $name,
        "phone" => $phone,
        "send_email" => true,
        "send_sms" => false,
        "email" => $email,
        "allow_repeated_payments" => false,
        "redirect_url" => "http://e2dshop.com/thanq.php",
        "webhook" => "http://e2dshop.com/webhook.php"


        ));
   // print_r($response);
    $pay_ulr = $response['longurl'];
  echo "<script>window.location.href='$pay_ulr'</script>";
   //header("Location : $pay_ulr");
   exit();
}
catch (Exception $e) {
    print('Error: ' . $e->getMessage());
}

?>

0 个答案:

没有答案