Sha256: 70d77086be1da9856cccc39e6576ad12c812fca48425ca20d28597243703fe17
Contents?: true
Size: 875 Bytes
Versions: 9
Compression:
Stored size: 875 Bytes
Contents
module Spree class Gateway::KomojuKonbini < KomojuGateway def authorize(money, source, options) details = { type: "konbini", store: source.convenience, phone: options[:billing_address][:phone], email: options[:email] } options = change_options_to_dollar(options) if options[:currency] == "JPY" response = provider.purchase(money - options[:tax], details, options) source.update!( expires_at: response.params["payment_deadline"].to_time, receipt: response.params["payment_details"]["receipt"], instructions_url: response.params["payment_details"]["instructions_url"], confirmation_code: response.params["payment_details"]["confirmation_code"] ) if response.success? response end def reusable_sources(*args) [] end end end
Version data entries
9 entries across 9 versions & 1 rubygems