Module: GMO::Payment::ShopAndSiteAPIMethods

Included in:
ShopAndSiteAPI
Defined in:
lib/gmo/shop_and_site_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



29
30
31
# File 'lib/gmo/shop_and_site_api.rb', line 29

def host
  @host
end

#localeObject (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_idObject (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_passObject (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_idObject (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_passObject (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”

Returns:

  • ###



98
99
100
101
102
103
104
# File 'lib/gmo/shop_and_site_api.rb', line 98

def exec_tran_brandtoken(options = {})
  name = "ExecTranBrandtoken.idPass"
  options[:token_type] = GMO::Const::TOKEN_TYPES_MAP[options[:token_type]]
  required = [:access_id, :access_pass, :member_id, :order_id]
  assert_required_options(required, options)
  post_request name, options
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(options = {})
  @shop_id   = options[:shop_id]
  @shop_pass = options[:shop_pass]
  @site_id   = options[:site_id]
  @site_pass = options[:site_pass]
  @host      = options[:host]
  @locale    = options.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 #{options.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”

Returns:

  • ###



59
60
61
62
63
64
# File 'lib/gmo/shop_and_site_api.rb', line 59

def trade_brandtoken(options = {})
  name = "TradedBrandtoken.idPass"
  required = [:order_id, :member_id]
  assert_required_options(required, options)
  post_request name, options
end

#trade_card(options = {}) ⇒ Object

2.17.2.1.決済後カード登録 指定されたオーダーID の取引に使用したカードを登録します。 CardSeq CardNo Forward

Returns:

  • ###



37
38
39
40
41
42
# File 'lib/gmo/shop_and_site_api.rb', line 37

def trade_card(options = {})
  name = "TradedCard.idPass"
  required = [:order_id, :member_id]
  assert_required_options(required, options)
  post_request name, options
end