Method: Pay::Stripe::Charge#capture
- Defined in:
- lib/pay/stripe/charge.rb
#capture(**options) ⇒ Object
stripe.com/docs/payments/capture-later
capture capture(amount_to_capture: 15_00)
160 161 162 163 164 165 166 |
# File 'lib/pay/stripe/charge.rb', line 160 def capture(**) raise Pay::Stripe::Error, "no payment_intent_id on charge" unless payment_intent_id.present? ::Stripe::PaymentIntent.capture(payment_intent_id, , ) self.class.sync(processor_id) rescue ::Stripe::StripeError => e raise Pay::Stripe::Error, e end |