Skip to content

feat(payment): PAYPAL-6433 implement server side shipping callbacks logic#3236

Merged
andriiVitvitskyi1990 merged 3 commits into
masterfrom
PAYPAL-6433_PR
May 19, 2026
Merged

feat(payment): PAYPAL-6433 implement server side shipping callbacks logic#3236
andriiVitvitskyi1990 merged 3 commits into
masterfrom
PAYPAL-6433_PR

Conversation

@andriiVitvitskyi1990

@andriiVitvitskyi1990 andriiVitvitskyi1990 commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

What/Why?

Implemented server side shipping callbacks logic

Rollout/Rollback

Revert PR

Testing

Unit tests


Note

Medium Risk
Changes PayPal hosted-checkout approval and updateOrder behavior around shipping data, which can affect address/shipping selection and order submission for physical carts. Also removes AppSwitch resume/appSwitchWhenAvailable handling, so regressions could impact mobile/app-return flows.

Overview
Implements a new isServerSideShippingCallbacksEnabled initialization flag across PayPal Commerce (PayPal + Credit/PayLater) strategies and shared utils to toggle client vs server handling of shipping callbacks.

When enabled, PayPal button configs omit onShippingAddressChange/onShippingOptionsChange, approval flows avoid pulling actions.order.get() for addresses, updateOrder sends no shipping options ([]) and selectedShippingOption: null, and checkout is reloaded before order submission for physical-item carts.

Separately, AppSwitch support is removed from these PayPal strategies/utilities (no appSwitchWhenAvailable, hasReturned()/resume() paths), with unit tests updated to reflect the new flag-driven behavior.

Reviewed by Cursor Bugbot for commit 036498d. Bugbot is set up for automated code reviews on this repo. Configure here.

@andriiVitvitskyi1990 andriiVitvitskyi1990 force-pushed the PAYPAL-6433_PR branch 3 times, most recently from 9a15f0a to 5501017 Compare April 30, 2026 11:39
@andriiVitvitskyi1990 andriiVitvitskyi1990 marked this pull request as ready for review April 30, 2026 11:56
@andriiVitvitskyi1990 andriiVitvitskyi1990 requested a review from a team as a code owner April 30, 2026 11:56
Comment thread packages/paypal-utils/src/paypal-types.ts
Comment thread packages/paypal-utils/src/paypal-button-creation-service.ts Outdated
Comment thread packages/paypal-utils/src/paypal-button-creation-service.ts
Comment thread packages/paypal-utils/src/paypal-button-creation-service.ts Outdated
Comment thread packages/paypal-utils/src/paypal-button-creation-service.ts
@andriiVitvitskyi1990 andriiVitvitskyi1990 force-pushed the PAYPAL-6433_PR branch 2 times, most recently from 4529853 to f85df12 Compare May 14, 2026 14:35
Comment thread packages/paypal-utils/src/paypal-button-creation-service.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1c82d79. Configure here.

Comment thread packages/paypal-utils/src/paypal-integration-service.ts
Comment thread packages/paypal-utils/src/paypal-button-creation-service.ts Outdated
@andriiVitvitskyi1990 andriiVitvitskyi1990 merged commit e84d166 into master May 19, 2026
9 checks passed
@andriiVitvitskyi1990 andriiVitvitskyi1990 deleted the PAYPAL-6433_PR branch May 19, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants