mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Update stripe_stubs to handle stripeSCA
This commit is contained in:
@@ -28,11 +28,11 @@ module StripeStubs
|
||||
end
|
||||
|
||||
# Attaches the payment method to the customer in the hub's stripe account
|
||||
def stub_payment_method_attach_request
|
||||
def stub_payment_method_attach_request(payment_method: "pm_123", customer: "cus_A123")
|
||||
stub_request(:post,
|
||||
"https://api.stripe.com/v1/payment_methods/pm_123/attach")
|
||||
.with(body: { customer: "cus_A123" })
|
||||
.to_return(hub_payment_method_response_mock({ pm_id: "pm_123" }))
|
||||
"https://api.stripe.com/v1/payment_methods/#{payment_method}/attach")
|
||||
.with(body: { customer: customer })
|
||||
.to_return(hub_payment_method_response_mock({ pm_id: payment_method }))
|
||||
end
|
||||
|
||||
def stub_retrieve_payment_method_request(payment_method_id = "pm_1234")
|
||||
|
||||
Reference in New Issue
Block a user