Module: GMO::Payment::ShopAndSiteAPIMethods
- Included in:
- ShopAndSiteAPI
- Defined in:
- lib/gmo/shop_and_site_api.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#shop_id ⇒ Object
readonly
Returns the value of attribute shop_id.
-
#shop_pass ⇒ Object
readonly
Returns the value of attribute shop_pass.
-
#site_id ⇒ Object
readonly
Returns the value of attribute site_id.
-
#site_pass ⇒ Object
readonly
Returns the value of attribute site_pass.
Instance Method Summary collapse
-
#exec_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID TokenType Token MemberID SeqMode TokenSeq ClientField1 ClientField2 ClientField3 Status OrderID Forward Approve TranID TranDate ClientField1 ClientField2 ClientField3 example ### gmo.exec_tran_brandtoken({ order_id: “597ae8c36120b23a3c00014e”, access_id: “139f8ec33a07c55f406937c52ce4473d”, access_pass: “2689b204d2c17192fa35f9269fa7e744”, token_type: :apple_pay, token: <Base64 encoded payment data>, member_id: “mem10001” }) => “OrderID”=>“597ae8c36120b23a3c00014e”, “Forward”=>“2a99663”, “Approve”=>“5487394”, “TranID”=>“1707281634111111111111771216”, “TranDate”=>“20170728163453”, “ClientField1”=>“Custom field value 1”, “ClientField2”=>“Custom field value 2”, “ClientField3”=>“Custom field value 3”.
- #initialize(options = {}) ⇒ Object
-
#trade_brandtoken(options = {}) ⇒ Object
MemberID OrderID DefaultFlag SeqMode TokenSeq CardNoToken Forward example ### gmo.trade_brandtoken({ member_id: ‘mem10001’, order_id: ‘ord10001’ }) => “CardNoToken”=>“*************111”, “Forward”=>“2a99663”.
-
#trade_card(options = {}) ⇒ Object
2.17.2.1.決済後カード登録 指定されたオーダーID の取引に使用したカードを登録します。 CardSeq CardNo Forward.
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
29 30 31 |
# File 'lib/gmo/shop_and_site_api.rb', line 29 def host @host end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
29 30 31 |
# File 'lib/gmo/shop_and_site_api.rb', line 29 def locale @locale end |
#shop_id ⇒ Object (readonly)
Returns the value of attribute shop_id.
29 30 31 |
# File 'lib/gmo/shop_and_site_api.rb', line 29 def shop_id @shop_id end |
#shop_pass ⇒ Object (readonly)
Returns the value of attribute shop_pass.
29 30 31 |
# File 'lib/gmo/shop_and_site_api.rb', line 29 def shop_pass @shop_pass end |
#site_id ⇒ Object (readonly)
Returns the value of attribute site_id.
29 30 31 |
# File 'lib/gmo/shop_and_site_api.rb', line 29 def site_id @site_id end |
#site_pass ⇒ Object (readonly)
Returns the value of attribute site_pass.
29 30 31 |
# File 'lib/gmo/shop_and_site_api.rb', line 29 def site_pass @site_pass end |
Instance Method Details
#exec_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID TokenType Token MemberID SeqMode TokenSeq ClientField1 ClientField2 ClientField3 Status OrderID Forward Approve TranID TranDate ClientField1 ClientField2 ClientField3 example ### gmo.exec_tran_brandtoken(
order_id: "597ae8c36120b23a3c00014e",
access_id: "139f8ec33a07c55f406937c52ce4473d",
access_pass: "2689b204d2c17192fa35f9269fa7e744",
token_type: :apple_pay,
token: <Base64 encoded payment data>,
member_id: "mem10001"
)
> “OrderID”=>“597ae8c36120b23a3c00014e”, “Forward”=>“2a99663”, “Approve”=>“5487394”, “TranID”=>“1707281634111111111111771216”, “TranDate”=>“20170728163453”, “ClientField1”=>“Custom field value 1”, “ClientField2”=>“Custom field value 2”, “ClientField3”=>“Custom field value 3”
98 99 100 101 102 103 104 |
# File 'lib/gmo/shop_and_site_api.rb', line 98 def exec_tran_brandtoken( = {}) name = "ExecTranBrandtoken.idPass" [:token_type] = GMO::Const::TOKEN_TYPES_MAP[[:token_type]] required = [:access_id, :access_pass, :member_id, :order_id] (required, ) post_request name, end |
#initialize(options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/gmo/shop_and_site_api.rb', line 18 def initialize( = {}) @shop_id = [:shop_id] @shop_pass = [:shop_pass] @site_id = [:site_id] @site_pass = [:site_pass] @host = [:host] @locale = .fetch(:locale, GMO::Const::DEFAULT_LOCALE) unless @site_id && @site_pass && @shop_id && @shop_pass && @host raise ArgumentError, "Initialize must receive a hash with :site_id, :site_pass, :shop_id, :shop_pass and either :host! (received #{.inspect})" end end |
#trade_brandtoken(options = {}) ⇒ Object
MemberID OrderID DefaultFlag SeqMode TokenSeq CardNoToken Forward example ### gmo.trade_brandtoken(
member_id: 'mem10001',
order_id: 'ord10001'
)
> “CardNoToken”=>“*************111”, “Forward”=>“2a99663”
59 60 61 62 63 64 |
# File 'lib/gmo/shop_and_site_api.rb', line 59 def trade_brandtoken( = {}) name = "TradedBrandtoken.idPass" required = [:order_id, :member_id] (required, ) post_request name, end |
#trade_card(options = {}) ⇒ Object
2.17.2.1.決済後カード登録 指定されたオーダーID の取引に使用したカードを登録します。 CardSeq CardNo Forward
37 38 39 40 41 42 |
# File 'lib/gmo/shop_and_site_api.rb', line 37 def trade_card( = {}) name = "TradedCard.idPass" required = [:order_id, :member_id] (required, ) post_request name, end |