简体   繁体   中英

Paypal API sandbox DoAuthorization() What is transaction id?

We are using Paypal for charging users. Right now, we have API call to BillUser to charge the user without authorization. We would like to change this to authorize first and charge at later point of time. Also, we would not like to redirect the user to Paypal page and we have Billing Agreement id for each of the accepted user. I was looking into Paypal APIs and found DoAuthorization() method which would help our need. But, this takes a transaction id as the input. How do i get this transaction id?

I can update the API to latest one using Nuget install-package PaypalMerchantSdk and use DoReferenceTransaction() method to authorize/capture payment. But, the problem with this is that it mandates API signature. We have API certificate for sandbox and live environment. We do not want to use API signature. Is there a C# example of using API certificate and calling this method without signature?

The GetExpressCheckoutDetails API operation obtains information about an Express Checkout transaction. You must use method GetExpressCheckoutDetails and parameter PAYMENTREQUEST_n_TRANSACTIONID:

Transaction ID for up to 10 parallel payment requests. You can specify up to 10 payments, where n is a digit between 0 and 9, inclusive.

Character length and limitations: 17 characters except for transactions of the type Order have a character length of 19. This field is available since version 64.0.

I am trying to accomplish something similar as far as I can tell you must use DoDirectPayment and set the paymentaction to Authorization This will send you back an Transaction-id Once you have that ID you can send it to DoAuthorization

How ever the problem I am having is that the Transaction id is still coming back invalid hope this help if you find the solution please share it thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM