【问题标题】:Paypal Payment need transactions detailsPaypal 支付需要交易详情
【发布时间】:2015-04-08 06:41:17
【问题描述】:

我使用了 paypal 付款表单提交,但作为响应,我们没有获得付款状态和交易详细信息,我们只获得了 payer_status。

我的代码如下:

<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="currency_code" value="AUD" >

<input type="hidden" name="rm" value="2" >

<input type="hidden" value="" name="custom" id="custom" />

<input type="hidden" name="invoice" value="" >

<input type="hidden" name="item_name" value="">

<input type="hidden" name="a3" value="" >

<input type="hidden" name="p3" value="" >

<input type="hidden" name="t3" value="" >

<input type="hidden" name="src" value="1" >

<input type="hidden" name="sra" value="1" >             
<input type="hidden" name="return" value="xx">

<input type="hidden" name="cancel_return" value="xx">

<input type="hidden" name="no_shipping" value="1" > 

让我知道任何获取交易详情的解决方案。

【问题讨论】:

标签: php paypal


【解决方案1】:

要获取贝宝交易详情,请按照以下步骤操作:

  1. 为了通过 paypal 账户获取交易详情,自动退货应该是“开启”。

      a: Login to your paypal account .
      b: Then go to your profile -> myselling tool ->website preference 
      c: Click on the auto return button make it "ON".
      d: And give the return url link on this page .(In my case my app return url is success.php)
    

2.当支付成功完成后,提供$_REQUEST 数组,其中包含产品ID、PayPal 交易ID、PayPal 接收金额值、PayPal 接收货币类型和PayPal 产品状态。 并将此代码写入您的 success.php 页面。

if (!empty($_REQUEST)) {
    $product_no = $_REQUEST['item_number']; // Product ID
    $product_transaction = $_REQUEST['tx']; // Paypal transaction ID
    $product_price = $_REQUEST['amt']; // Paypal received amount value
    $product_currency = $_REQUEST['cc']; // Paypal received currency type
    $product_status = $_REQUEST['st']; // Paypal product status 
 }

我希望这可以清除 paypal transactions details

【讨论】:

    猜你喜欢
    • 2014-11-27
    • 2013-09-06
    • 2016-03-17
    • 2014-07-20
    • 2018-12-20
    • 2016-12-22
    • 2021-05-30
    • 1970-01-01
    • 2013-04-30
    相关资源
    最近更新 更多