【问题标题】:Paypal Mobile Library IPN verificationPaypal 移动图书馆 IPN 验证
【发布时间】:2012-10-14 06:29:07
【问题描述】:

我是一名 PHP 开发人员。我已经实现了 Paypal 移动图书馆 IPN。 这是我在测试模式下收到的内容。

$_POST = array(
'payment_request_date' => 'Wed Jun 15 07:21:26 PDT 2011',
'return_url' => 'https://www.paypal.com',
'fees_payer' => 'EACHRECEIVER',
'ipn_notification_url' => 'http://mysite.com/myscript.php',
'verify_sign' => 'AsPVXqWsrQkFWs.gl9jI5iQU2b53AiFm-2O-GeHSy9tAKrrPm327E81P',
'test_ipn' => 1,
'transaction' => array('USD 9.99'),
'cancel_url' => 'https://www.paypal.com',
'pay_key' => 'AP-725112792Y356822X',
'action_type' => 'CREATE',
'memo' => '55547098#1 month platinum membership',
'transaction_type' => 'Adaptive Payment PAY',
'status' => 'COMPLETED',
'log_default_shipping_address_in_transaction' => false,
'charset' => 'windows-1252',
'sender_useCredentials' => true,
'notify_version' => 'UNVERSIONED',
'reverse_all_parallel_payments_on_error' => false,
);

我看到有一个字段 verify_sign,所以我猜它应该通过发送到 https://www.sandbox.paypal.com/cgi-bin/webscr 以下 POST 请求:

$req = 'cmd=_notify-validate&'.http_build_query($_POST); 但它总是返回无效。 我还尝试使用对 GetTransactionDetails 的 SOAP 请求来验证此交易,asTransactionID 我指定了 $_POST['pay_key'] (AP-725112792Y356822X) 并且此服务返回错误 10004 交易ID无效

那么如何验证 Paypal Mobile Library 响应? 我可以在沙盒模式下或仅在现场检查它的验证吗?

感谢您的任何建议。

【问题讨论】:

    标签: php paypal paypal-ipn


    【解决方案1】:

    我建议在此处尝试在 PayPal 开发人员网络上使用 PHP 中的 IPN 代码示例:https://www.x.com/developers/PayPal/documentation-tools/code-sample/216623

    【讨论】:

      猜你喜欢
      • 2015-05-27
      • 2015-06-08
      • 2011-03-01
      • 2015-12-02
      • 2012-03-09
      • 2016-06-26
      • 2016-07-10
      • 2016-05-27
      • 2017-02-17
      相关资源
      最近更新 更多