Files
openfoodnetwork/spec/support/spree/payment_helper.rb
2023-11-07 16:30:50 +09:00

17 lines
323 B
Ruby

# frozen_string_literal: true
module Spree
module PaymentHelper
def payment_intent(amount, status)
JSON.generate(
object: "payment_intent",
amount:,
status:,
charges: { data: [{ id: "ch_1234", amount: }] },
id: "12345",
livemode: false
)
end
end
end