Skip to content

fix: Request NO_SHIPPING from PayPal for digital-only orders - #1537

Open
dgupta4-godaddy wants to merge 7 commits into
godaddy:mainfrom
dgupta4-godaddy:paypal-digital-only-no-shipping
Open

dgupta4-godaddy wants to merge 7 commits into
godaddy:mainfrom
dgupta4-godaddy:paypal-digital-only-no-shipping

Conversation

@dgupta4-godaddy

Copy link
Copy Markdown

Summary

  • Extend PayPal shipping suppression (already used for pickup) to digital-only orders via isDigitalOnlyOrder
  • Omit the country-code-only shipping stub and set shipping_preference: NO_SHIPPING so PayPal no longer rejects digital checkout with POSTAL_CODE_REQUIRED

Changeset

  • Changeset added (docs)

Test Plan

  • Digital-only cart: PayPal createOrder omits purchase_units[].shipping and uses NO_SHIPPING
  • Ship-to-address cart: still uses SET_PROVIDED_ADDRESS and includes shipping
  • Mixed cart with a shippable item: does not treat as digital-only / still provides shipping

dgupta4-godaddy and others added 2 commits November 18, 2026 12:50
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot

changeset-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee4839e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@godaddy/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pbennett1-godaddy pbennett1-godaddy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few inline notes below. One broader point: the cause seems to be in use-build-payment-request.ts (around line 243, which isn't in this diff). buildPaymentRequests always builds a shippingAddress and fills in country_code from the session origin, even when the order has no shipping address. Leaving out shipping there when order.shipping.address.addressLine1 is missing, and choosing NO_SHIPPING from that, would cover pickup, digital, purchase mode and any future fulfillment mode in one place. Without that, every caller of payPalRequest has to repeat this exception.

pbennett1-godaddy and others added 4 commits November 19, 2026 13:32
Omit PayPal shipping when the order has no street address and decide the
shipping preference from the delivery method read after the checkout flush,
covering pickup, digital and purchase-mode orders.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dgupta4-godaddy
dgupta4-godaddy marked this pull request as ready for review November 23, 2026 18:41
@dgupta4-godaddy
dgupta4-godaddy requested a review from a team as a code owner November 23, 2026 18:41
@dgupta4-godaddy

Copy link
Copy Markdown
Author

Thanks @pbennett1-godaddy, all addressed in 1aa2874. PayPal shipping is now left out at the source when the order has no street address. createOrder reads deliveryMethod after the flush and sends NO_SHIPPING unless it's a SHIP order with an address, which covers digital, pickup and purchase mode as you suggested.

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.

2 participants