Paypal DoReferenceTransaction fails - paypal

My application has express checkout feature and calls the following API operations
a) setExpressCheckout
b) GetExpressCheckoutDetails
c) CreateBillingAgreement
This gives me the BILLINGAGREEMENTID which is then passed to DoReferenceTransaction API operation .
The above operation fails with error "Billing agreement id or transaction id is invalid".
This was working with old version of paypal API but is failing after upgrade.
Any pointers why this might be failing?

Related

Paypal Array returning success message but payment not getting process i am using laravel and express-checkout

PayPal retuning me the success array but the payment not getting ** processed** please help me.
enter image description here
Why are you using the classic express checkout API? That is almost 20 years old. You should be using the v2/checkout/orders API, with the Checkout-PHP-SDK or similar. See the information and links for a server integration within Set up standard payments.
The problem with your "payment not getting processed" is that no payment has been executed or captured. After payer approval, it is required to execute a DoExpressCheckoutPayment API call (classic API) -- or similarly with the current API, an orders capture API call.

How can I cancel a PayPal Billing Agreement via an API call

I'm using PayPal NVP API to do reference transactions with express checkout. I create billing agreements and charge using the agreements in sandbox and in a production environment, however when I try to call BAUpdate (METHOD=BillingAgreementUpdate in the NVP API) I get the a response with error code 81002 and description
Method specified is not Supported
I can't find anywhere in PayPal's docs if this method is deprecated or if I need to send something else.
The proper call is BillAgreementUpdate (confusing, I know). That should let you cancel your billing agreement.

PayPal SOAP API Error 13606 When trying to call Refund API method with Payer ID and amount

When I try to call RefundTransaction API method usiong PayerID i get Error "13606 Feature Not Enabled. You are not enabled for this feature.".
What it does mean? Is there a way to enable it?
To reproduce you can go to https://devtools-paypal.com/apiexplorer/PayPalAPIs and try to execute RefundTransaction method with PayerID and Amount filled in.
Direct from PayPal Support:
TransactionID and PayerID are marked "conditional", but you couldn't set blank.
For example, A buyer purchased several items in different period , but if you call RefundTransaciton API only set PayerID,
PayPal couldn't judge in which transaction to refund, and also could not refund the amount about all of these items.
PayPal is not allowed this case happen.
So at least you have to set the transaction ID while calling the refund API.
So the solution is to always specify TransactionID.
Yes, their own API Documentation says:
"Either the transaction ID or the payer ID must be specified."
But apparently this is not the case.
If you don't log subscr_payment IPN calls, you can look up TransactionID from a PayerID by using the TransactionSearch API request. Put your PayerID in the ProfileID search field.

Paypal Digital Goods, Transactions not displaying

I've integrated Digital Goods with Express Checkout for my site and I've successfully tested with using sandbox. However I doesn't show any record of the transaction I've just completed in either the merchant account or the test account.
Should I be seeing a transaction? and if so, what could have gone wrong such that a transaction record isn't appearing?
You're most likely not calling the DoExpressCheckoutPayment API call to finalize the transaction.
DoExpressCheckoutPayment is a mandatory API call used to create a transaction out of a TOKEN and PAYERID (assuming the buyer has approved the transaction on the PayPal website).
The API doc (NVP) for DoExpressCheckoutPayment is available at developer.paypal.com.

L_ERRORCODE0:10409 Express Checkout token was issued for a merchant account other than yours

L_ERRORCODE0:10409 Express Checkout token was issued for a merchant
account other than yours
What is this error means?
I didn't understand the cause of this ERROR in my application when i integrate paypal express checkout.
I'm assuming you must have gotten that when calling DoExpressCheckoutPayment..??
The only reason I can think that you would get this is if you're using different API credentials for SetExpressCheckout than you used in DoExpressCheckoutPayment.
Or, it could be that when you called SetExpressCheckout you were using a SUBJECT value and you forgot to include this same value in your DoExpressCheckoutPayment request.
That's all I can think of that would raise that error, because it really does mean exactly what it says...the token is for a different account than you're trying to process the payment with.