Reputation: 18795
I am working with the PHP version of the PayPal REST API within Sandbox environment.
I was able to create and execute a payment, that was approved using a Sandbox PayPal Account. The payment was made using MANUAL_BANK_TRANSFER
, meaning that there is not enough money on the PayPal Account. The user would have to transfer money to his PayPal account first. Thus the payment was created as Pending
.
So far so good. After creating/approving the payment I logged into the PayPal account of the Sandbox user and canceled the payment. I assumed, that my system would get notified of this action via another Webhook Event. This was not the case. I received no event at all.
I created the Webhook Event as wildcard (all events) and the PAYMENT.SALE.PENDING
event was received without any problem. Thus there should be no problem with receiving other events. But even one hour after the payment was canceled I have not received any event.
I assume that I should get notified of a canceled payment, but I don't know if this is really the case. The PayPal docu does not describe in detail which events will be triggered by which actions.
So, is there something wrong with my Webhook config or is there really no event on canceled payments?
Upvotes: 1
Views: 334
Reputation: 1847
When refunding a payment via the paypal-account/paypal-backend, you don't get notified via webhooks. Webhooks only work when the action was invoked via the REST-API. The only possible thing you could do is implementing an INP, but I haven't tested it if this will work.
Upvotes: 0