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

Don't display subscribe_pro methods in instant purchase when method not allowed for one-time purchase and not creating a subscription #255

Open
chrismshea opened this issue Dec 7, 2023 · 4 comments
Assignees
Labels

Comments

@chrismshea
Copy link

chrismshea commented Dec 7, 2023

PR: #269

That's a mouthful, but:
In Magento 2 the Subscribe Pro payment method should be disabled for one time purchases.

SP_Method_One-Time-No

In Magento 2 Instant Purchase button on Product Detail Page is enabled by default.

m2-frontend-instant-purchase
m2_frontend_instant_purchase

So, when one time purchase is disabled should we only allow the Instant Purchase button to display when customer is subscribing or if they have a saved card that is not subscribe_pro.

@eugene-shab
Copy link
Collaborator

@chrismshea
Did I understand you correctly, if the config one-time purchase is set as false

If we have saved the SP payment method:

  • for One Time Delivery Instance Purchase should be hidden
  • for Regular Delivery Instance Purchase should be shown

If we have saved non-SP payment method:

  • for One Time Delivery Instance Purchase should be shown
  • for Regular Delivery Instance Purchase should be hidden

@eugene-shab eugene-shab self-assigned this Dec 20, 2023
@chrismshea
Copy link
Author

I think we need one more category:
If you have a saved sp and non sp method.

  • for One Time Delivery Instant Purchase should show non-SP payment method
  • for Regular Delivery Instance Purchase should be shown with SP payment method

I'm not sure how to change what profile is used for instant purchase and I have not seen a selector when the modal pops up.

@eugene-shab
Copy link
Collaborator

@chrismshea @garthbrantley
I added functionality for processing Instant Purchase buttons and a modal popup when the config Enabled for Non-Subscription Transactions is disabled.

Magento on the default behavior for the Instant Purchases button calls the last available Payment Method Token from the vault_payment_token table.

I have doubts about some cases:

  1. If the SP payment method is enabled, what should the behavior be on a Non-Subscription product? At the moment the SP method token is substituted in the Instant Purchase modal.
  2. If the SP payment method is disabled, what behavior should the Subscription product have? Currently if selected:
    • One Time Delivery Instant Purchase button is shown (Non-SP payment method enabled - e.x Braintree)
    • Regular Delivery Instant Purchase button is not shown

eugene-shab added a commit that referenced this issue Dec 27, 2023
garthbrantley added a commit that referenced this issue Jan 15, 2024
#255 Don't display subscribe_pro methods in instant purchase when method not allowed for one-time purchase and not creating a subscription
@chrismshea
Copy link
Author

chrismshea commented Jan 15, 2024

Instant Purchase Requires:

  • Logged In Customer
  • Stored Default Address
  • Stored Payment Method
  • Have Logged Out, and Back In after meeting the above requirements. Also could have completed a checkout with saved card.
  • if storing a new card in My Account you will need to log out and back in before that latest card is chosen in Instant Purchase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants