Created
April 25, 2019 00:55
-
-
Save davidpatters0n/2ce480332b766de9db86af1138f82301 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
klass = Stripe::PaymentIntent | |
intent_params = { | |
payment_method: payment_method_id, | |
amount: amount, | |
currency: currency, | |
confirmation_method: 'manual', | |
confirm: true, | |
expand: ['payment_method'] | |
} | |
intent = klass.create(intent_params, api_key) if payment_method_id | |
# When using a the card: 4111 1111 1111 1111 I get a response with the charge already processed | |
"receipt_email": null, | |
[2] pry(#<Api::V2::StripeEventsController>)> intent.charges | |
=> #<Stripe::ListObject:0x3ff6042e626c> JSON: { | |
"object": "list", | |
"data": [ | |
{"id":"ch_1ESvqw42hvyHeN72wNsBOY6c","object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment