PPv2 APM: Create referenced PPObjects for APM Orders; enable webhooks to capture them #3958
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are seeing some customers using APMs losing payments and bookings, as they seem to get lost in the process.
As of right now, the only time a capture is occurring is when a the PayView POSTs (after a successful payment) or if the success-view is hit. This is done through the
execute_payment()
-function of the payment provider.We are in the process of researching what the customer is doing exactly to apparently never hit these pages (or if they hit them, why nothing happens).
By manually removing the calls to
execute_payment
fromviews.py
, I was able to recreate the behavior: An approved payment with no LogEntries for the "Order approved"-webhooks.The latter is caused by a lack of
ReferencedPayPalObject
at this point - it also only gets written once theexecute_payment()
is run and we have something to capture.This PR changes two things:
ReferencedPayPalObjects
for orders, if a payment object already exists (aka: for APMs)Order approved
-payment through the capture-processRef: Z#23141601, Z#23146632