-
Notifications
You must be signed in to change notification settings - Fork 47
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
Use payment_source + experience_context #1491
Draft
AlexP11223
wants to merge
11
commits into
trunk
Choose a base branch
from
PCP-1801-experience-context
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d7ff72e
to
7bb4112
Compare
Dinamiko
approved these changes
Jul 7, 2023
@@ -18,7 +18,7 @@ | |||
use WooCommerce\PayPalCommerce\ApiClient\Entity\OrderStatus; | |||
use WooCommerce\PayPalCommerce\ApiClient\Entity\PatchCollection; | |||
use WooCommerce\PayPalCommerce\ApiClient\Entity\Payer; | |||
use WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentMethod; | |||
use WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentSource; | |||
use WooCommerce\PayPalCommerce\ApiClient\Entity\PaymentToken; |
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 PaymentToken
not needed here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replacing the deprecated
application_context
fields withpayment_source
+experience_context
. https://developer.paypal.com/docs/api/orders/v2/#orders_createAffects mainly the orders created via
CreateOrderEndpoint
.Oxxo remains unchanged: not sure if it needs such context for order creation (and in
/confirm-payment-source
it is not deprecated).PUI does not seem to use
application_context
too.We set
application_context.stored_payment_source
here for subscriptions, it is ok because this field was not deprecated.And for now keeping the old format for ACDC because it's unclear how to create
payment_source
for it.Also added
PAYER_ACTION_REQUIRED
in the list of order statuses because it seems to be created with this status now (but it does not affect anything). And now allowing both 200 and 201 HTTP status codes, it supposed to be 200 according to the docs but it was 201 when using old format.For the existing plugin installations continuing to use the old format with
application_context
to avoid breaking filters likeppcp_create_order_request_body_data
. This can be overridden viappcp_flag_old_application_context
filter orPPCP_FLAG_OLD_APPLICATION_CONTEXT=0
(or1
) env var.