You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have several cases where, when generating payments using a Preapproval, the IPN response will get a 400 Bad Request response, as seen in the IPN History of my PayPal account.
The reason being, PayPal is acting inconsistent from their documentation (surprise!). An example of a response they are sending looks like the following (censored for identifying details):
payment_request_date=Wed Jan 08 23:30:05 PST 2014&return_url=http://scottsmarketplace.com/paypal/adaptive/pay/return/14/xxxxxxxxxxxxxxxxxxxx/&fees_payer=EACHRECEIVER&ipn_notification_url=http://scottsmarketplace.com/paypal/adaptive/ipn/14/xxxxxxxxxxxxxxxxxxxx/&[email protected]&verify_sign=xxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx&transaction[0].id_for_sender_txn=xxxxxxxxxxxxxxxxxxxx&transaction[0][email protected]&cancel_url=http://scottsmarketplace.com/paypal/adaptive/pay/cancel/14/xxxxxxxxxxxxxxxxxxxx/&transaction[0].is_primary_receiver=false&reason_code=CLEARED&pay_key=AP-xxxxxxxxxxxxxxxxxxxx&action_type=PAY&transaction[0].id=xxxxxxxxxxxxxxxxxxxx&transaction[0].status=Completed&transaction[0].paymentType=SERVICE&preapproval_key=PA-xxxxxxxxxxxxxxxxxxxx&transaction[0].status_for_sender_txn=Completed&transaction[0].pending_reason=NONE&transaction[0].amount=USD 9.99&status=COMPLETED&log_default_shipping_address_in_transaction=false&charset=windows-1252¬ify_version=UNVERSIONED&reverse_all_parallel_payments_on_error=false
Lots of censoring, obviously, but if you look carefully you will see that there is no transaction_type provided. They only sent back an action_type.
Has anybody else noticed this? My proposed solution so far would be defaulting the transaction_type to "Adaptive Payment PAY" but I haven't yet found any documentation to support that decision.
Is this a change which would be open to a pull request?
The text was updated successfully, but these errors were encountered:
I received the following response from PayPal. I'm not sure they really understand the problem. Then again, I'm not sure I really do either.
Hello Joey,
thank you for contacting the PayPal Merchant Technical Support Services.
The problem you're seeing is that the IPN messages you're receiving are for the API caller - within Adaptive Payments, the notify URL is used for the calling API account. These messages will look different to what you'd expect the merchant to receive.
In the case of this IPN, when looking at the "reason_code", it looks like a notification that the payment itself has been "cleared", so it would've been a payment that was under review or just not paid through an "instant" funding method.
I have several cases where, when generating payments using a Preapproval, the IPN response will get a 400 Bad Request response, as seen in the IPN History of my PayPal account.
I was able to trace this down to https://github.com/FundedByMe/django-paypal-adaptive/blob/master/paypaladaptive/api/ipn/endpoints.py#L84
The reason being, PayPal is acting inconsistent from their documentation (surprise!). An example of a response they are sending looks like the following (censored for identifying details):
Lots of censoring, obviously, but if you look carefully you will see that there is no
transaction_type
provided. They only sent back anaction_type
.Has anybody else noticed this? My proposed solution so far would be defaulting the
transaction_type
to "Adaptive Payment PAY" but I haven't yet found any documentation to support that decision.Is this a change which would be open to a pull request?
The text was updated successfully, but these errors were encountered: