Maximum number of authorization allowed for the order is reached

S12345
Contributor
Contributor

Hello,

We are working on Sandbox account to integration with Paypal Express checkout. We are using Custom Order process and need to do multiple auth/settle for one order.

When I try to do second authorization for my custom order, I am getting error below. Can you help me what am I doing wrong?

Error Msg: Maximum number of authorization allowed for the order is reached

Here is the API request calls I am making-

1.
curl https://api-3t.sandbox.paypal.com/nvp \
-s \
--insecure \
-d USER=sj-facilitator_api1.agilcommerce.com \
-d SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AvLW.D2fIVZH9ws2zETNn1Hbv6x. \
-d METHOD=SetExpressCheckout \
-d VERSION=95 \
-d PAYMENTREQUEST_0_PAYMENTACTION=Order \
-d PAYMENTREQUEST_0_AMT=119.95 \
-d PAYMENTREQUEST_0_CURRENCYCODE=USD \
-d RETURNURL=http://www.example.com/success.html \
-d CANCELURL=http://www.example.com/cancel.html

2.
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC%2d9DP667239P366982S

3.
curl https://api-3t.sandbox.paypal.com/nvp \
-s \
--insecure \
-d USER=sj-facilitator_api1.agilcommerce.com \
-d SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AvLW.D2fIVZH9ws2zETNn1Hbv6x. \
-d METHOD=GetExpressCheckoutDetails \
-d VERSION=95 \
-d TOKEN=EC-9DP667239P366982S


4.
setOrder (get payerid from above)


curl https://api-3t.sandbox.paypal.com/nvp \
-s \
--insecure \
-d USER=sj-facilitator_api1.agilcommerce.com \
-d SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AvLW.D2fIVZH9ws2zETNn1Hbv6x. \
-d METHOD=DoExpressCheckoutPayment \
-d VERSION=95 \
-d TOKEN=EC-9DP667239P366982S \
-d PAYERID=EJH4Q3SLZAE7C \
-d PAYMENTREQUEST_0_PAYMENTACTION=Order \
-d PAYMENTREQUEST_0_AMT=119.95 \
-d PAYMENTREQUEST_0_CURRENCYCODE=USD


5.
doAuth (get PAYMENTINFO_0_TRANSACTIONID from above)

curl https://api-3t.sandbox.paypal.com/nvp \
-s \
--insecure \
-d USER=sj-facilitator_api1.agilcommerce.com \
-d SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AvLW.D2fIVZH9ws2zETNn1Hbv6x. \
-d METHOD=DoReAuthorization \
-d VERSION=95 \
-d TRANSACTIONID=O-2WK425820M4453342 \
-d AMT=20 \
-d CURRENCYCODE=USD

6.
doSettle (get TRANSACTIONID from above and pass as authid)

curl https://api-3t.sandbox.paypal.com/nvp \
-s \
--insecure \
-d USER=sj-facilitator_api1.agilcommerce.com \
-d PWD=4FUQB7SYGF2HWHG6 \
-d SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AvLW.D2fIVZH9ws2zETNn1Hbv6x. \
-d METHOD=DoCapture \
-d VERSION=95 \
-d AUTHORIZATIONID=6YT40041B01900236 \
-d AMT=19.95 \
-d CURRENCYCODE=USD \
-d COMPLETETYPE=NotComplete

7.
doAuth (get PAYMENTINFO_0_TRANSACTIONID from above)

curl https://api-3t.sandbox.paypal.com/nvp \
-s \
--insecure \
-d USER=sj-facilitator_api1.agilcommerce.com \
-d SIGNATURE=AFcWxV21C7fd0v3bYYYRCpSSRl31AvLW.D2fIVZH9ws2zETNn1Hbv6x. \
-d METHOD=DoReAuthorization \
-d VERSION=95 \
-d TRANSACTIONID=O-2WK425820M4453342 \
-d AMT=20 \
-d CURRENCYCODE=USD

 

Login to Me Too
1 REPLY 1

MTS_Andre
Moderator
Moderator

Hi, in this case you can create one authorization only for the whole order amount (so that you will not create more authorizations).

Then you can call several DoCapture, when needed. It should work fine.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.