-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functions for capturing, refunding, voiding programmatically #1262
Conversation
needed for providing API
no reason to put it into extension, only adds confusion
api/order-functions.php
Outdated
} | ||
|
||
/** | ||
* Captures the PayPal order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems here Refunds instead of Captures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
The refund ID now is not added to meta during This way the refund can be added to WC by webhooks, if the meta does not contain the ID yet. (for normal refund on both sides there is |
Resolves #590
Adds
ppcp_*
global functions for capturing, refunding, voiding, and also for retrieving PayPal order since it may be needed for deciding whether to perform these operations (like we do inRefundProcessor
).Also now there is an easier way to retrieve the app container:
PPCP::container()
. But as before, using it may not be the best approach for third-party developers because we do not guarantee the backward compatibility.I am not sure if
ppcp
is the prefix that we should use, since it has no relation to the plugin name. It probably refers to PayPal Commerce Platform which seems suitable, but not mentioned in the plugin description etc. In our filters/hooks there is no consistent prefix currently.