【发布时间】:2016-10-27 18:08:14
【问题描述】:
我正在进行定期付款。付款完成并恢复到退货网址后,我没有收到 ipn 响应。这是我的定期付款代码:
$query = array();
$query['cmd'] = '_xclick-subscriptions';
$query['upload'] = '1';
$query['business'] = $select_paypal_detail[0]->business_mail;
$product = $_POST['package'];
//$product_price = $_POST['price'];
$product_quantity = $_POST['quantity'];
$query['a3'] = $_POST['price'];
$query['p3'] = 1;
$query['t3'] = 'D';
$query['no_note'] = 1;
//$query['amount'] = $_POST['price'];
$query['discount_rate'] = $_POST['discount'];
$query['item_name'] = $_POST['package'];
$query['quantity'] = $_POST['quantity'];
$query['currency'] = 'CAD';
$query['instId'] = '211616';
$query['testMode'] = 100;
$_SESSION['order_number'] = $order_number;
$query['cartId'] = 'Order Number '.$_POST['order_number'];
$query['return'] = $select_paypal_detail[0]->return_url;
$query['notify_url'] = "http://theelitecoachingacademy.com/?AngellEYE_Paypal_Ipn_For_Wordpress&action=ipn_handler";
// Prepare query string
$query_string = http_build_query($query);
if( $select_paypal_detail[0]->payment_type == 'live' ){
?>
<!--/header('Location: https://www.paypal.com/cgi-bin/webscr?' . $query_string);
header('Location: https://www.sandbox.paypal.com/cgi-bin/webscr?' . $query_string);-->
<script type="text/javascript">
window.location="https://www.paypal.com/cgi-bin/webscr?<? echo $query_string ?>";
</script>
<?php } else { ?>
<script type="text/javascript">
window.location="https://www.sandbox.paypal.com/cgi-bin/webscr?<? echo $query_string ?>";
</script>
<?php
}?>
【问题讨论】:
-
你有什么错误吗?
-
我在响应 [auth] 和 [form_charset] 中只得到两个变量。我想要交易ID和付款状态
标签: php paypal paypal-sandbox