mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Move stripe sca gateway error messages to translatable keys
This commit is contained in:
@@ -34,7 +34,7 @@ module Spree
|
||||
def purchase(money, creditcard, gateway_options)
|
||||
payment_intent_id = payment_intent(creditcard, gateway_options)
|
||||
unless payment_intent_id
|
||||
return failed_activemerchant_billing_response("No Pending Payment Found")
|
||||
return failed_activemerchant_billing_response(I18n.t(:no_pending_payments))
|
||||
end
|
||||
|
||||
payment_intent_response = Stripe::PaymentIntent.retrieve(payment_intent_id,
|
||||
@@ -45,7 +45,7 @@ module Spree
|
||||
message)
|
||||
end
|
||||
if payment_intent_response.status != 'requires_capture'
|
||||
return failed_activemerchant_billing_response("Invalid PaymentIntent status.")
|
||||
return failed_activemerchant_billing_response(I18n.t(:invalid_payment_state))
|
||||
end
|
||||
|
||||
options = basic_options(gateway_options)
|
||||
|
||||
@@ -275,7 +275,9 @@ en:
|
||||
none: None
|
||||
notes: Notes
|
||||
error: Error
|
||||
processing_payment: Processing payment...
|
||||
processing_payment: "Processing payment..."
|
||||
no_pending_payments: "No pending payments"
|
||||
invalid_payment_state: "Invalid Payment state"
|
||||
filter_results: Filter Results
|
||||
quantity: Quantity
|
||||
pick_up: Pick up
|
||||
|
||||
Reference in New Issue
Block a user