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

Pass the Stripe Source in the order meta instead of in a post parameter #470

Closed
jesucarr opened this Issue Jan 19, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@jesucarr

jesucarr commented Jan 19, 2018

At the moment the process_payment function checks if the $_POST['stripe_source'] parameter is set, but we could store the stripe_source in a meta field of the order, and check if that is set instead. This way, plugins could simply call the process_payment function in a standard way without the need of setting additional post parameters for this plugin to work.

@roykho

This comment has been minimized.

Show comment
Hide comment
@roykho

roykho Jan 19, 2018

Member

Are you doing something custom that requires you to call process_payment?

Member

roykho commented Jan 19, 2018

Are you doing something custom that requires you to call process_payment?

@jesucarr

This comment has been minimized.

Show comment
Hide comment
@jesucarr

jesucarr Jan 19, 2018

Yes, I'm creating an order outside of the checkout flow and sending it to the process_payment function

jesucarr commented Jan 19, 2018

Yes, I'm creating an order outside of the checkout flow and sending it to the process_payment function

@roykho

This comment has been minimized.

Show comment
Hide comment
@roykho

roykho Jan 19, 2018

Member

Yeah we're not going to change that at this time. Saving it to meta is not the best option as source object changes and having to go back in to update them is not ideal.

Member

roykho commented Jan 19, 2018

Yeah we're not going to change that at this time. Saving it to meta is not the best option as source object changes and having to go back in to update them is not ideal.

@roykho roykho closed this Jan 19, 2018

@jesucarr

This comment has been minimized.

Show comment
Hide comment
@jesucarr

jesucarr Jan 19, 2018

So what is the best option to save the source in the order, rather than passing it via a post parameter (forcing plugins to customize their code for this plugin)?

jesucarr commented Jan 19, 2018

So what is the best option to save the source in the order, rather than passing it via a post parameter (forcing plugins to customize their code for this plugin)?

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