File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1169,6 +1169,7 @@ def self.mock_payment_intent(params = {})
1169
1169
def self . mock_payment_method ( params = { } )
1170
1170
payment_method_id = params [ :id ] || 'pm_1ExEuFL2DI6wht39WNJgbybl'
1171
1171
1172
+ type = params [ :type ] . to_sym
1172
1173
data = {
1173
1174
card : {
1174
1175
brand : 'visa' ,
@@ -1200,7 +1201,7 @@ def self.mock_payment_method(params = {})
1200
1201
fingerprint : 'FD81kbVPe7M05BMj' ,
1201
1202
last4 : '3000'
1202
1203
}
1203
- } . slice ( params [ :type ] . to_sym )
1204
+ }
1204
1205
1205
1206
{
1206
1207
id : payment_method_id ,
@@ -1223,7 +1224,7 @@ def self.mock_payment_method(params = {})
1223
1224
metadata : {
1224
1225
order_id : '123456789'
1225
1226
}
1226
- } . merge ( data ) . merge ( params )
1227
+ } . merge ( type => data [ type ] ) . merge ( params )
1227
1228
end
1228
1229
1229
1230
def self . mock_setup_intent ( params = { } )
You can’t perform that action at this time.
0 commit comments