Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Commit 973b56b

Browse files
Allow capture_method to be specified from ENV variable (#58)
1 parent 7b68ffc commit 973b56b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

web.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ def create_payment_intent(amount, source_id, payment_method_id, customer_id = ni
231231
:return_url => return_url,
232232
:confirm => confirm,
233233
:confirmation_method => confirm ? "manual" : "automatic",
234+
:capture_method => ENV['CAPTURE_METHOD'] == "manual" ? "manual" : "automatic",
234235
:metadata => {
235236
:order_id => '5278735C-1F40-407D-933A-286E463E72D8',
236237
}.merge(metadata || {}),

0 commit comments

Comments
 (0)