Skip to content

[Mobile Payments] Onboarding may be better if it relied on payments_enabled in the WCPayAccount response #12847

@joshheald

Description

There are some cases where onboarding can show an error in the app, even though the merchant could accept payments on the web.

This happens for some cases of progressive onboarding.

At present, passing our IPP onboarding relies on the following check, after any specific errors:

account.wcpayStatus == .complete ||
account.wcpayStatus == .enabled ||
account.wcpayStatus == .restrictedSoon ||
account.wcpayStatus == .pendingVerification

The pendingVerification step was added in response to one specific case of this issue, however we've had to gradually add more and more statuses to our list of "onboarding complete" statuses – originally, I believe it was only .complete that allowed a payment.

Potential solution

WCPay teams have advised that the payments_enabled flag may be a better indicator of whether a merchant can accept payments – this is what's used on the web.

See pdfdoF-5fQ-p2#comment-6364 for context.

This would be a significant change, and need investigation before deciding we should go ahead with it. It would also require significant testing. The onboarding flows were originally written with a lot of care, and trial-and-error, and should match exactly between iOS and Android for easier support.

One particular open question – does payments_enabled return true even if the WCPay gateway is not enabled on the web checkout? i.e. when the extension is enabled and onboarded, but its toggle in WPAdmin > WooCommerce > Settings > Payments > All Payment Gateways is off, the flag should still return true for it to be suitable for IPP.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    feature: mobile paymentsRelated to mobile payments / card present payments / Woo Payments.priority: lowNot many people are affected or there’s a workaround, etc.type: enhancementA request for an enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions