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

Back-end Platform Compatibility #20

Closed
rain2o opened this issue Jul 22, 2019 · 4 comments
Closed

Back-end Platform Compatibility #20

rain2o opened this issue Jul 22, 2019 · 4 comments
Assignees

Comments

@rain2o
Copy link
Contributor

rain2o commented Jul 22, 2019

I understand that this module handles the payment side directly with Stripe and simply passes the token to the back-end platform of Vue Storefront on place order. But I'm curious what platforms this module currently supports? In order for it to support a back-end platform it would need to send the payment method code and data according to the platform's requirements.

I notice that the payment method "Stripe" (code stripe) is hard-coded to be injected as a payment method with this module. Shouldn't this be coming from the back-end platform's allowed payment methods? There are a few concerns with this approach.

  1. Stripe might not always be available. For example we have restrictions of payment methods based on the storeview and the billing/shipping address. This logic for us is handled in Magento 2 (our VSF back-end platform) and the available payment methods returned from the API is updated accordingly.
  2. The code used stripe isn't what Stripe's official Magento 2 module uses as the payment method code. They use stripe_payments for the Credit Card method, and they have a series of other methods available as well.
  3. Duplicate Stripe payment methods - If our backend platform has Stripe Credit Card payment method enabled then it's going to add it to the list of payment methods returned when calling the API. In this situation we have two Stripe payment methods - the one from back-end and the one hard-coded in this module.

This does add some level of complexity to this if the methods are to be handled dynamically. For starters, the method code might be different for Magento 2 Stripe module vs some other e-commerce platform with Stripe support. I'm not sure if they make this consistent across all platforms or not. Additionally this means the module would need to have some way of ensuring only supported methods via Stripe are utilized. This could be as simple as a disclaimer in the README I suppose, stating which methods are currently supported. But then the logic in the module would need to check the method codes and know what to expect for each one that is supported based on what the platform uses.


I don't have a clear question in this issue (other than what back-end platforms are currently supported if any), and there is no clear answer to all my rambling. But I think this is a good start to a conversation and potential roadmap for this module.

@collymore
Copy link
Member

collymore commented Jul 22, 2019

Ok thanks for looking into this.
I suggest we include the method code in the modules vsf config, that way it can be updated as required.

To enable it per store based on the Backend enabled payment methods we can implement some logic for checking if it should be included inside of the component here https://github.com/develodesign/vsf-payment-stripe/blob/master/index.ts

We'll be working on this over the next 4 weeks for another project, please let us know if you can look at it or need any advice on anything.

@dimasch
Copy link
Contributor

dimasch commented Nov 12, 2019

I will push updates.

@dimasch dimasch self-assigned this Nov 12, 2019
dimasch added a commit that referenced this issue Nov 12, 2019
#20 Compatibility with the official Stripe magento2 module.
@dimasch
Copy link
Contributor

dimasch commented Nov 12, 2019

@rain2o Ready, you can check on v2.5.0 tag.

@dimasch dimasch closed this as completed Nov 12, 2019
@dimasch
Copy link
Contributor

dimasch commented Nov 12, 2019

Now we use https://stripe.com/docs/plugins/magento/install#download as base backend.

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

No branches or pull requests

3 participants