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

Implement the standard gateway interfaces using the Stripe gem #152

Closed
6 tasks done
Tracked by #142
elia opened this issue Dec 21, 2022 · 0 comments · Fixed by #156
Closed
6 tasks done
Tracked by #142

Implement the standard gateway interfaces using the Stripe gem #152

elia opened this issue Dec 21, 2022 · 0 comments · Fixed by #156
Assignees
Milestone

Comments

@elia
Copy link
Member

elia commented Dec 21, 2022

There is a number of standard methods that should be implemented on the payment gateway as described in this guide: https://guides.solidus.io/advanced-solidus/payments-and-refunds/#custom-payment-gateways.

The gateway is expected to implement these methods using the Stripe gem (and not ActiveMerchant):

  • #initialize(options): initializes the gateway with the provided options. By default, Solidus will pass the payment method's preferences in here.
  • #authorize(money, source, options = {}): authorizes a certain amount on the provided payment source.
  • #capture(money, transaction_id, options = {}): captures a certain amount from a previously authorized transaction.
  • #purchase(money, source, options = {}): authorizes and captures a certain amount on the provided payment source.
  • #void(transaction_id, [source,] options = {}): voids a previously authorized transaction, releasing the funds that are on hold. The source parameter is only needed for payment gateways that support payment profiles.
  • #credit(money, [source,] transaction_id, options = {}): refunds the provided amount on a previously captured transaction. The source parameter is only needed for payment gateways that support payment profiles.
@elia elia mentioned this issue Dec 21, 2022
11 tasks
@elia elia linked a pull request Dec 30, 2022 that will close this issue
7 tasks
@elia elia closed this as completed in #156 Jan 24, 2023
@elia elia added this to the v5 milestone Feb 22, 2023
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

Successfully merging a pull request may close this issue.

1 participant