使用并行付款的DoExpressCheckoutPayment之后无法捕获金额 [英] Cannot capture amounts after DoExpressCheckoutPayment with parallel payment

查看:142
本文介绍了使用并行付款的DoExpressCheckoutPayment之后无法捕获金额的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用PayPal的Express Checkout API进行并行付款.一切正常,在收款人网站上,这笔2笔付款被记为未结".

I user PayPal's Express Checkout API to make an parallel Payment. Everything works fine, on the payee site, the 2 payments are booked as "open".

在执行DoExpressCheckoutPayment时,我获得每次付款的交易ID.但是doCapture失败,原因是您%20do%20not%20have%20permissions%20to%20make%20this%20API%20call".几周前我支付了一笔但从未兑现的授权付款,给我的只是"Order%20has%20expired%2e"-很好.

While DoExpressCheckoutPayment I get an transaction id for each payment. But a doCapture fails with "You%20do%20not%20have%20permissions%20to%20make%20this%20API%20call". A single authorized payment that I made several weeks ago but have never captured gives me just "Order%20has%20expired%2e" - which is fine.

我为NVP API使用以下参数:

I use the following parameters for the NVP API:

    $parameters = array("METHOD"=>"DoCapture",
                "AUTHORIZATIONID"=>$transactionid_item,
                "AMT"=>$amt_item,
                "CURRENCYCODE"=>$currencycode,
                "COMPLETETYPE"=>"Complete"
               );

当然,变量是每次付款的对应值. (加上身份验证/api凭据).

when of course the variable are the corresponding values to each payment. (plus authentication/api credential).

我做错了什么?当我进行并行付款而不是单笔付款时,是否需要设置其他变量?

What am I doing wrong? Is there an additional variable to set when I make a parallel instead of an single payment?

致谢

chris

这是一个示例调用和响应:

This is an example call and the response:

https://api-3t.sandbox.paypal.com/nvp?METHOD=DoCapture&AUTHORIZATIONID=O-67121848EA448750G&AMT=9.70&CURRENCYCODE=EUR&COMPLETETYPE=Complete&USER=xxx&PWD=xxx&SIGNATURE=xxx&VERSION=95.0

array(9) {
  ["TIMESTAMP"]=>
  string(28) "2013%2d06%2d15T09%3a35%3a52Z"
  ["CORRELATIONID"]=>
  string(12) "140dec053198"
  ["ACK"]=>
  string(7) "Failure"
  ["VERSION"]=>
  string(6) "95%2e0"
  ["BUILD"]=>
  string(7) "6444009"
  ["L_ERRORCODE0"]=>
  string(5) "10007"
  ["L_SHORTMESSAGE0"]=>
  string(19) "Permission%20denied"
  ["L_LONGMESSAGE0"]=>
  string(67) "You%20do%20not%20have%20permissions%20to%20make%20this%20API%20call"
  ["L_SEVERITYCODE0"]=>
  string(5) "Error"
}

推荐答案

似乎您正在按订单运行Express Checkout API调用,然后您正在转身并执行DoCapture请求,但您正在传递订单ID代表身份验证ID而不是授权ID.如果您想将Express Checkout设置为订单而不是auth或sale,那么您需要通过以下方式执行呼叫.

It looks like you are running your Express Checkout API call as an order, then you are turning around and doing a DoCapture request but you are passing over the order id for the auth id instead of the authorization id. If you are wanting to set your Express Checkout to be an order instead of an auth or a sale, then you need to perform the calls in the following ways.

SetExpressCheckout API调用(按顺序处理)
GetExpressCheckoutDetail API调用
DoExpressCheckoutPayment API调用(按订单处理)

SetExpressCheckout API call (processing as order)
GetExpressCheckoutDetail API Call
DoExpressCheckoutPayment API Call (processing as order)

DoAuthorization(执行身份验证,并传递您从EC流程收到的订单ID)

DoAuthorization (performs an auth, and passes over the order id that you received from the EC flow)

DoCapture(执行对auth的捕获,您将跳过在上一次调用中返回的auth ID,而不是订单ID)

DoCapture (performs a capture against the auth, you will pass over the auth id that was returned in the previous call here, not the order id)

这篇关于使用并行付款的DoExpressCheckoutPayment之后无法捕获金额的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆