Skip to content
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

[Payments] Add IPP support for Puerto Rico #14972

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

iamgabrielma
Copy link
Contributor

@iamgabrielma iamgabrielma commented Jan 24, 2025

Closes: #14646

Description

As with the Android counterpart this PR adds IPP support for Puerto Rico by not blocking nor preventing to process a card payment in the mobile client when the store address is set to PR.

Testing information

  • In wp-admin > WooCommerce > Settings. Set the store Country/State to Puerto Rico
  • Attempt to process an IPP payment
Screenshot 2025-01-24 at 12 14 26

I was unable to test the full payment flow due to zip code error despite trying multiple PR zip codes (00600, 00940, 00681), which I believe is expected without a fully-functional PR account setup in Stripe/WCPay (context p1737715359181589-slack-C025A8VV728).

Before the changes, we were blocked upon onboarding under a "non-supported country" error through in the client, after the changes we bypass this block and the invalidPostalCode (which I'm assuming we can only resolve with a fully-functional PR account) comes from the server:

Before After
IMG_1061 IMG_1062

In the same nature, there is no specific /PR/ URL to acquire a card reader, upon navigating to Payments > Order Card Reader it will fallback to the M2 reader:

IMG_1064


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on all devices (phone/tablet) and no regressions are added.

@iamgabrielma iamgabrielma added the feature: mobile payments Related to mobile payments / card present payments / Woo Payments. label Jan 24, 2025
@iamgabrielma iamgabrielma added this to the 21.6 milestone Jan 24, 2025
@iamgabrielma iamgabrielma requested a review from staskus January 24, 2025 11:16
@iamgabrielma iamgabrielma marked this pull request as ready for review January 24, 2025 11:16
@wpmobilebot
Copy link
Collaborator

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr14972-7fa6956
Version21.4
Bundle IDcom.automattic.alpha.woocommerce
Commit7fa6956
App Center BuildWooCommerce - Prototype Builds #12691
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@staskus
Copy link
Contributor

staskus commented Jan 27, 2025

Unfortunately, it doesn't work for me as well. I tried to:

  • Change existing store address to Puerto Rico
  • Create a new store with Puerto Rico address and onboard to WooPayments with Puerto Rico address

Both result in connection failures.

💳 Stripe Error Code: SCPError(rawValue: 9020)
💳 Card Reader Service Error: connection(underlyingError: Hardware.UnderlyingError.processorAPIError)
CoreData: debug: PostSaveMaintenance: incremental_vacuum with freelist_count - 9 and pages_to_free 1
🔵 Tracked card_reader_discovery_failed, properties: [is_wpcom_store: false, was_ecommerce_trial: false, plan: jetpack_free, site_url: https://obvious-toad-bobolink.jurassic.ninja, site_id: 241124518, country: PR, store_id: e783a36f-e98e-4cf2-ac73-bced35b3c4be, error_description: Sorry, this payment couldn’t be processed., connection_type: user_initiated, plugin_slug: woocommerce-payments, blog_id: 241124518]
🔵 Tracked card_reader_connection_failed, properties: [is_wpcom_store: false, was_ecommerce_trial: false, card_reader_model: STRIPE_M2, plan: jetpack_free, site_id: 241124518, site_url: https://obvious-toad-bobolink.jurassic.ninja, country: PR, store_id: e783a36f-e98e-4cf2-ac73-bced35b3c4be, error_description: The payment can not be processed by the payment processor., connection_type: user_initiated, plugin_slug: woocommerce-payments, blog_id: 241124518]

There could be an additional step missing to make it work 🤔

@iamgabrielma
Copy link
Contributor Author

Thanks for testing, the 9020 seems to indicate an API error, but it's pretty generic. I'll take a further look 🤔

 /**
     The underlying request returned an API error.
     */
    SCPErrorStripeAPIError = 9020,

@iamgabrielma iamgabrielma modified the milestones: 21.6, 21.7 Jan 31, 2025
@iamgabrielma iamgabrielma marked this pull request as draft January 31, 2025 17:10
@wpmobilebot wpmobilebot modified the milestones: 21.7, 21.8 Feb 7, 2025
@wpmobilebot
Copy link
Collaborator

Version 21.7 has now entered code-freeze, so the milestone of this PR has been updated to 21.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: mobile payments Related to mobile payments / card present payments / Woo Payments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[IPP] Add IPP config for Puerto Rico
3 participants