Module: GMO::Payment::ShopAPIMethods
- Included in:
- ShopAPI
- Defined in:
- lib/gmo/shop_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.
Instance Method Summary collapse
-
#alter_tran(options = {}) ⇒ Object
2.14.2.1.決済変更 仮売上の決済に対して実売上を行います。尚、実行時に仮売上時との金額チェックを行います。 /payment/AlterTran.idPass ShopID ShopPass AccessID 取引ID AccessPass 取引パスワード JobCd 処理区分 “SALES” Amount 利用金額 AccessID AccessPass Forward Approve TranID TranDate example ### gmo.alter_tran({ access_id: “a41d83f1f4c908baeda04e6dc03e300c”, access_pass: “d72eca02e28c88f98b9341a33ba46d5d”, job_cd: “SALES”, amount: 100 }) “AccessPass”=>“cc0093ca8758c6616fa0ab9bf6a43e8d”, “Forward”=>“2a99662”, “Approve”=>“6284199”, “TranID”=>“1302140555111111111111193536”, “TranDate”=>“20130215110651”.
-
#change_tran(options = {}) ⇒ Object
2.15.2.1.金額変更 決済が完了した取引に対して金額の変更を行います。 AccessID AccessPass Forward Approve TranID TranDate example ### gmo.change_tran({ access_id: “a41d83f1f4c908baeda04e6dc03e300c”, access_pass: “d72eca02e28c88f98b9341a33ba46d5d”, job_cd: “CAPTURE”, amount: 100 }).
-
#change_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID JobCd Amount Tax AccessID AccessPass Status Forward Approve TranID TranDate example ### gmo.change_tran_brandtoken({ access_id: “21170701482c86c3b88ff72b83bfd363”, access_pass: “51f36feba120de1e6e29532e5a3a5e3e”, order_id: “ord10001”, job_cd: “CAPTURE”, amount: 2000 }) => “AccessPass”=>“51f36feba120de1e6e29532e5a3a5e3e”, “Status”=>“CAPTURE”, “Forward”=>“2a99663”, “Approve”=>“5538477”, “TranID”=>“1707311633111111111111771224”, “TranDate”=>“20170731163343”.
-
#cvs_cancel(options = {}) ⇒ Object
【コンビニ払い】 2.2.2.1.
-
#entry_tran(options = {}) ⇒ Object
2.1.2.1.取引登録 これ以降の決済取引で必要となる取引 ID と取引パスワードの発行を行い、取引を開始します。 ItemCode Tax TdFlag TdTenantName AccessID AccessPass ErrCode ErrInfo example ### gmo.entry_tran({ order_id: 100, job_cd: “AUTH”, amount: 100 }) “AccessPass”=>“d72eca02e28c88f98b9341a33ba46d5d”.
-
#entry_tran_brandtoken(options = {}) ⇒ Object
OrderID JobCd Amount ItemCode Tax AccessID AccessPass example ### gmo.entry_tran_brandtoken({ order_id: “ord12345”, job_cd: “AUTH”, item_code: “1000001”, tax: “0001001”, amount: 100 }) => “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”.
-
#entry_tran_cvs(options = {}) ⇒ Object
【コンビニ払い】 2.1.2.1.
-
#entry_tran_docomo(options = {}) ⇒ Object
OrderID JobCd Amount ItemCode Tax AccessID AccessPass example ### gmo.entry_tran_docomo({ order_id: “ord12345”, job_cd: “AUTH”, item_code: “1000001”, tax: “0001001”, amount: 100 }) => “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”.
-
#entry_tran_edy(options = {}) ⇒ Object
OrderID Amount Tax AccessID AccessPass example ### gmo.entry_tran_edy({ order_id: “ord12345”, tax: “0001001”, amount: 100 }) => “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”.
-
#entry_tran_ganb(options = {}) ⇒ Object
【銀行振込(バーチャル口座 あおぞら)】 取引登録 オーダーIDを指定して取引を登録します。.
-
#entry_tran_linepay(options = {}) ⇒ Object
【LINE Pay決済】 20.1.2.1.
-
#entry_tran_pay_easy(options = {}) ⇒ Object
【Pay-easy決済】 5.1.2.1.
-
#entry_tran_paypal(options = {}) ⇒ Object
【PayPal決済】 取引登録 これ以降の決済取引で必要となる取引IDと取引パスワードの発行を行い、取引を開始します。.
-
#entry_tran_rakuten_id(options = {}) ⇒ Object
OrderID JobCd Amount ItemCode Tax AccessID AccessPass example ### gmo.entry_tran_rakuten_id({ order_id: “ord12345”, job_cd: “AUTH”, item_code: “1000001”, tax: “0001001”, amount: 100 }) => “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”.
-
#entry_tran_suica(options = {}) ⇒ Object
OrderID Amount Tax AccessID AccessPass example ### gmo.entry_tran_suica({ order_id: “ord12345”, tax: “0001001”, amount: 100 }) => “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”.
-
#entry_tran_virtualaccount(options = {}) ⇒ Object
OrderID Amount Tax AccessID AccessPass example ### gmo.entry_tran_virtualaccount({ order_id: “ord12345”, tax: “0001001”, amount: 100 }) => “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”.
-
#exec_tran(options = {}) ⇒ Object
2.2.2.2.決済実行 指定されたサイトに会員を登録します。 return ACS OrderID Forward Method PayTimes Approve TranID TranDate CheckString ClientField1 ClientField2 ClientField3 ACS OrderID Forward Method PayTimes Approve TranID CheckString ClientField1 ClientField2 ClientField3 example ### gmo.exec_tran({ order_id: 100, access_id: “a41d83f1f4c908baeda04e6dc03e300c”, access_pass: “d72eca02e28c88f98b9341a33ba46d5d”, method: 1, pay_times: 1, card_no: “4111111111111111”, expire: “1405”, #format YYMM client_field_1: “client_field1” }) “OrderID”=>“100”, “Forward”=>“2a99662”, “Method”=>“1”, “PayTimes”=>“”, “Approve”=>“6294780”, “TranID”=>“1302160543111111111111192829”, “TranDate”=>“20130216054346”, “CheckString”=>“3e455a2168fefc90dbb7db7ef7b0fe82”, “ClientField1”=>“client_field1”, “ClientField2”=>“”, “ClientField3”=>“”.
-
#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>, seq_mode: “1”, token_seq: 1001, client_field_1: “Custom field value 1”, client_field_2: “Custom field value 2”, client_field_3: “Custom field value 3” }) => “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”.
-
#exec_tran_cvs(options = {}) ⇒ Object
【コンビニ払い】 2.1.2.2.
-
#exec_tran_docomo(options = {}) ⇒ Object
【ドコモ払い決済】 18.1.2.2.
-
#exec_tran_edy(options = {}) ⇒ Object
【楽天Edy決済】 18.1.2.2.
-
#exec_tran_ganb(options = {}) ⇒ Object
【銀行振込(バーチャル口座 あおぞら)】 決済実行 登録された取引に対してバーチャル口座を発行します。.
-
#exec_tran_linepay(options = {}) ⇒ Object
【LINE Pay決済】 20.1.2.2.
-
#exec_tran_pay_easy(options = {}) ⇒ Object
【Pay-easy決済】 5.1.2.2.
-
#exec_tran_paypal(options = {}) ⇒ Object
【PayPal決済】 決済実行 PayPalと通信を行い決済要求結果を返します。.
-
#exec_tran_rakuten_id(options = {}) ⇒ Object
【楽天ペイ決済】 18.1.2.2.
-
#exec_tran_suica(options = {}) ⇒ Object
【モバイルSuica決済】 18.1.2.2.
-
#exec_tran_virtualaccount(options = {}) ⇒ Object
【銀行振込(バーチャル口座)決済】 18.1.2.2.
- #initialize(options = {}) ⇒ Object
-
#refund_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID Amount Tax AccessID AccessPass Status Forward Approve TranID TranDate example ### gmo.refund_tran_brandtoken({ access_id: “139f8ec33a07c55f406937c52ce4473d”, access_pass: “2689b204d2c17192fa35f9269fa7e744”, order_id: “597ae8c36120b23a3c00014e”, amount: 1000, tax: “0001001” }) => “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”, “Status”=>“RETURN”, “Forward”=>“2a99663”, “Approve”=>“5537883”, “TranID”=>“1707311620111111111111771220”, “TranDate”=>“20170731162256”.
-
#sales_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID Amount Tax AccessID AccessPass Status Forward Approve TranID TranDate example ### gmo.sales_tran_brandtoken({ access_id: “139f8ec33a07c55f406937c52ce4473d”, access_pass: “2689b204d2c17192fa35f9269fa7e744”, order_id: “597ae8c36120b23a3c00014e”, amount: 1000, tax: “0001001” }) => “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”, “Status”=>“SALES”, “Forward”=>“2a99663”, “Approve”=>“5537883”, “TranID”=>“1707311620111111111111771220”, “TranDate”=>“20170731162256”.
-
#search_trade(options = {}) ⇒ Object
2.16.2.1.取引状態参照 指定したオーダーID の取引情報を取得します。.
-
#search_trade_multi(options = {}) ⇒ Object
13.1.2.1.取引状態参照 指定したオーダーIDの取引情報を取得します。 OrderID PayType OrderID Status ProcessDate JobCd AccessID AccessPass ItemCode Amount Tax SiteID MemberID CardNoToken Expire Method PayTimes Forward TranID Approve ClientField1 ClientField2 ClientField3 PayType example ### gmo.search_trade_multi({ order_id: ‘598066176120b2235300020b’, pay_type: 27 }) => “Status”=>“CAPTURE”, “ProcessDate”=>“20170801202929”, “JobCd”=>“CAPTURE”, “AccessID”=>“228fc5bc02da46943300c12706d325a2”, “AccessPass”=>“090a50ec2f77d92184a18018f07906e5”, “ItemCode”=>“0000990”, “Amount”=>“557”, “Tax”=>“0”, “SiteID”=>“”, “MemberID”=>“”, “CardNoToken”=>“************1111”, “Expire”=>“2212”, “Method”=>“1”, “PayTimes”=>“”, “Forward”=>“2a99663”, “TranID”=>“1708012029111111111111771228”, “Approve”=>“5689128”, “ClientField1”=>“”, “ClientField2”=>“”, “ClientField3”=>“”, “PayType”=>“27”.
-
#secure_tran(options = {}) ⇒ Object
2.2.2.4 認証後決済実行.
-
#void_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID AccessID AccessPass Status Forward Approve TranID TranDate example ### gmo.void_tran_brandtoken({ access_id: “139f8ec33a07c55f406937c52ce4473d”, access_pass: “2689b204d2c17192fa35f9269fa7e744”, order_id: “597ae8c36120b23a3c00014e” }) => “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”, “Status”=>“VOID”, “Forward”=>“2a99663”, “Approve”=>“5537590”, “TranID”=>“1707311610111111111111771219”, “TranDate”=>“20170731161007”.
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
28 29 30 |
# File 'lib/gmo/shop_api.rb', line 28 def host @host end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
28 29 30 |
# File 'lib/gmo/shop_api.rb', line 28 def locale @locale end |
#shop_id ⇒ Object (readonly)
Returns the value of attribute shop_id.
28 29 30 |
# File 'lib/gmo/shop_api.rb', line 28 def shop_id @shop_id end |
#shop_pass ⇒ Object (readonly)
Returns the value of attribute shop_pass.
28 29 30 |
# File 'lib/gmo/shop_api.rb', line 28 def shop_pass @shop_pass end |
Instance Method Details
#alter_tran(options = {}) ⇒ Object
2.14.2.1.決済変更 仮売上の決済に対して実売上を行います。尚、実行時に仮売上時との金額チェックを行います。 /payment/AlterTran.idPass ShopID ShopPass AccessID 取引ID AccessPass 取引パスワード JobCd 処理区分 “SALES” Amount 利用金額 AccessID AccessPass Forward Approve TranID TranDate example ### gmo.alter_tran(
access_id: "a41d83f1f4c908baeda04e6dc03e300c",
access_pass: "d72eca02e28c88f98b9341a33ba46d5d",
job_cd: "SALES",
amount: 100
) “AccessPass”=>“cc0093ca8758c6616fa0ab9bf6a43e8d”, “Forward”=>“2a99662”, “Approve”=>“6284199”, “TranID”=>“1302140555111111111111193536”, “TranDate”=>“20130215110651”
487 488 489 490 491 492 |
# File 'lib/gmo/shop_api.rb', line 487 def alter_tran( = {}) name = "AlterTran.idPass" required = [:access_id, :access_pass, :job_cd] (required, ) post_request name, end |
#change_tran(options = {}) ⇒ Object
2.15.2.1.金額変更 決済が完了した取引に対して金額の変更を行います。 AccessID AccessPass Forward Approve TranID TranDate example ### gmo.change_tran(
access_id: "a41d83f1f4c908baeda04e6dc03e300c",
access_pass: "d72eca02e28c88f98b9341a33ba46d5d",
job_cd: "CAPTURE",
amount: 100
)
510 511 512 513 514 515 |
# File 'lib/gmo/shop_api.rb', line 510 def change_tran( = {}) name = "ChangeTran.idPass" required = [:access_id, :access_pass, :job_cd, :amount] (required, ) post_request name, end |
#change_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID JobCd Amount Tax AccessID AccessPass Status Forward Approve TranID TranDate example ### gmo.change_tran_brandtoken(
access_id: "21170701482c86c3b88ff72b83bfd363",
access_pass: "51f36feba120de1e6e29532e5a3a5e3e",
order_id: "ord10001",
job_cd: "CAPTURE",
amount: 2000
)
> “AccessPass”=>“51f36feba120de1e6e29532e5a3a5e3e”, “Status”=>“CAPTURE”, “Forward”=>“2a99663”, “Approve”=>“5538477”, “TranID”=>“1707311633111111111111771224”, “TranDate”=>“20170731163343”
541 542 543 544 545 546 |
# File 'lib/gmo/shop_api.rb', line 541 def change_tran_brandtoken( = {}) name = "ChangeTranBrandtoken.idPass" required = [:access_id, :access_pass, :order_id, :job_cd, :amount] (required, ) post_request name, end |
#cvs_cancel(options = {}) ⇒ Object
【コンビニ払い】 2.2.2.1. 支払停止 コンビニ決済センターとの通信を行い取引の支払停止処理を行います。
637 638 639 640 641 642 |
# File 'lib/gmo/shop_api.rb', line 637 def cvs_cancel( = {}) name = "CvsCancel.idPass" required = [:access_id, :access_pass, :order_id] (required, ) post_request name, end |
#entry_tran(options = {}) ⇒ Object
2.1.2.1.取引登録 これ以降の決済取引で必要となる取引 ID と取引パスワードの発行を行い、取引を開始します。 ItemCode Tax TdFlag TdTenantName AccessID AccessPass ErrCode ErrInfo example ### gmo.entry_tran(
order_id: 100,
job_cd: "AUTH",
amount: 100
) “AccessPass”=>“d72eca02e28c88f98b9341a33ba46d5d”
48 49 50 51 52 53 54 |
# File 'lib/gmo/shop_api.rb', line 48 def entry_tran( = {}) name = "EntryTran.idPass" required = [:order_id, :job_cd] required << :amount if [:job_cd] && [:job_cd] != "CHECK" (required, ) post_request name, end |
#entry_tran_brandtoken(options = {}) ⇒ Object
OrderID JobCd Amount ItemCode Tax AccessID AccessPass example ### gmo.entry_tran_brandtoken(
order_id: "ord12345",
job_cd: "AUTH",
item_code: "1000001",
tax: "0001001",
amount: 100
)
> “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”
124 125 126 127 128 129 |
# File 'lib/gmo/shop_api.rb', line 124 def entry_tran_brandtoken( = {}) name = "EntryTranBrandtoken.idPass" required = [:order_id, :job_cd, :amount] (required, ) post_request name, end |
#entry_tran_cvs(options = {}) ⇒ Object
【コンビニ払い】
2.1.2.1. 取引登録
これ以降の決済取引で必要となる取引IDと取引パスワードの発行を行い、取引を開始します。
59 60 61 62 63 64 |
# File 'lib/gmo/shop_api.rb', line 59 def entry_tran_cvs( = {}) name = "EntryTranCvs.idPass" required = [:order_id, :amount] (required, ) post_request name, end |
#entry_tran_docomo(options = {}) ⇒ Object
OrderID JobCd Amount ItemCode Tax AccessID AccessPass example ### gmo.entry_tran_docomo(
order_id: "ord12345",
job_cd: "AUTH",
item_code: "1000001",
tax: "0001001",
amount: 100
)
> “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”
174 175 176 177 178 179 |
# File 'lib/gmo/shop_api.rb', line 174 def entry_tran_docomo( = {}) name = "EntryTranDocomo.idPass" required = [:order_id, :job_cd, :amount] (required, ) post_request name, end |
#entry_tran_edy(options = {}) ⇒ Object
OrderID Amount Tax AccessID AccessPass example ### gmo.entry_tran_edy(
order_id: "ord12345",
tax: "0001001",
amount: 100
)
> “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”
237 238 239 240 241 242 |
# File 'lib/gmo/shop_api.rb', line 237 def entry_tran_edy( = {}) name = "EntryTranEdy.idPass" required = [:order_id, :amount] (required, ) post_request name, end |
#entry_tran_ganb(options = {}) ⇒ Object
【銀行振込(バーチャル口座 あおぞら)】
取引登録
オーダーIDを指定して取引を登録します。
89 90 91 92 93 94 |
# File 'lib/gmo/shop_api.rb', line 89 def entry_tran_ganb( = {}) name = "EntryTranGANB.idPass" required = [:order_id, :amount] (required, ) post_request name, end |
#entry_tran_linepay(options = {}) ⇒ Object
【LINE Pay決済】
20.1.2.1. 取引登録
これ以降の決済取引で必要となる取引IDと取引パスワードの発行を行い、取引を開始します。
99 100 101 102 103 104 |
# File 'lib/gmo/shop_api.rb', line 99 def entry_tran_linepay( = {}) name = "EntryTranLinepay.idPass" required = [:order_id, :job_cd, :amount] (required, ) post_request name, end |
#entry_tran_pay_easy(options = {}) ⇒ Object
【Pay-easy決済】
5.1.2.1. 取引登録
これ以降の決済取引で必要となる取引IDと取引パスワードの発行を行い、取引を開始します。
69 70 71 72 73 74 |
# File 'lib/gmo/shop_api.rb', line 69 def entry_tran_pay_easy( = {}) name = "EntryTranPayEasy.idPass" required = [:order_id, :amount] (required, ) post_request name, end |
#entry_tran_paypal(options = {}) ⇒ Object
【PayPal決済】
取引登録
これ以降の決済取引で必要となる取引IDと取引パスワードの発行を行い、取引を開始します。
79 80 81 82 83 84 |
# File 'lib/gmo/shop_api.rb', line 79 def entry_tran_paypal( = {}) name = "EntryTranPaypal.idPass" required = [:order_id, :job_cd, :amount] (required, ) post_request name, end |
#entry_tran_rakuten_id(options = {}) ⇒ Object
OrderID JobCd Amount ItemCode Tax AccessID AccessPass example ### gmo.entry_tran_rakuten_id(
order_id: "ord12345",
job_cd: "AUTH",
item_code: "1000001",
tax: "0001001",
amount: 100
)
> “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”
149 150 151 152 153 154 |
# File 'lib/gmo/shop_api.rb', line 149 def entry_tran_rakuten_id( = {}) name = "EntryTranRakutenId.idPass" required = [:order_id, :job_cd, :amount] (required, ) post_request name, end |
#entry_tran_suica(options = {}) ⇒ Object
OrderID Amount Tax AccessID AccessPass example ### gmo.entry_tran_suica(
order_id: "ord12345",
tax: "0001001",
amount: 100
)
> “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”
216 217 218 219 220 221 |
# File 'lib/gmo/shop_api.rb', line 216 def entry_tran_suica( = {}) name = "EntryTranSuica.idPass" required = [:order_id, :amount] (required, ) post_request name, end |
#entry_tran_virtualaccount(options = {}) ⇒ Object
OrderID Amount Tax AccessID AccessPass example ### gmo.entry_tran_virtualaccount(
order_id: "ord12345",
tax: "0001001",
amount: 100
)
> “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”
195 196 197 198 199 200 |
# File 'lib/gmo/shop_api.rb', line 195 def entry_tran_virtualaccount( = {}) name = "EntryTranVirtualaccount.idPass" required = [:order_id, :amount] (required, ) post_request name, end |
#exec_tran(options = {}) ⇒ Object
2.2.2.2.決済実行 指定されたサイトに会員を登録します。 return ACS OrderID Forward Method PayTimes Approve TranID TranDate CheckString ClientField1 ClientField2 ClientField3 ACS OrderID Forward Method PayTimes Approve TranID CheckString ClientField1 ClientField2 ClientField3 example ### gmo.exec_tran(
order_id: 100,
access_id: "a41d83f1f4c908baeda04e6dc03e300c",
access_pass: "d72eca02e28c88f98b9341a33ba46d5d",
method: 1,
pay_times: 1,
card_no: "4111111111111111",
expire: "1405", #format YYMM
client_field_1: "client_field1"
) “OrderID”=>“100”, “Forward”=>“2a99662”, “Method”=>“1”, “PayTimes”=>“”, “Approve”=>“6294780”, “TranID”=>“1302160543111111111111192829”, “TranDate”=>“20130216054346”, “CheckString”=>“3e455a2168fefc90dbb7db7ef7b0fe82”, “ClientField1”=>“client_field1”, “ClientField2”=>“”, “ClientField3”=>“”
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/gmo/shop_api.rb', line 283 def exec_tran( = {}) name = "ExecTran.idPass" if [:client_field_1] || [:client_field_2] || [:client_field_3] [:client_field_flg] = "1" else [:client_field_flg] = "0" end [:device_category] = "0" # args = { # "AccessID" => options[:access_id], # "AccessPass" => options[:access_pass], # "OrderID" => options[:order_id], # "Method" => options[:method], # "PayTimes" => options[:pay_times], # "CardNo" => options[:card_no], # "Expire" => options[:expire], # "HttpAccept" => options[:http_accept], # "HttpUserAgent" => options[:http_ua], # "DeviceCategory" => "0", # "ClientField1" => options[:client_field_1], # "ClientField2" => options[:client_field_2], # "ClientField3" => options[:client_field_3], # "ClientFieldFlag" => client_field_flg # } if [:token].nil? required = [:access_id, :access_pass, :order_id, :card_no, :expire] else required = [:access_id, :access_pass, :token] end (required, ) post_request name, end |
#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>,
seq_mode: "1",
token_seq: 1001,
client_field_1: "Custom field value 1",
client_field_2: "Custom field value 2",
client_field_3: "Custom field value 3"
)
> “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”
455 456 457 458 459 460 461 |
# File 'lib/gmo/shop_api.rb', line 455 def exec_tran_brandtoken( = {}) name = "ExecTranBrandtoken.idPass" [:token_type] = GMO::Const::TOKEN_TYPES_MAP[[:token_type]] required = [:access_id, :access_pass, :order_id] (required, ) post_request name, end |
#exec_tran_cvs(options = {}) ⇒ Object
【コンビニ払い】 2.1.2.2. 決済実行 お客様が入力した情報で後続の決済センターと通信を行い決済を実施し、結果を返します。
328 329 330 331 332 333 |
# File 'lib/gmo/shop_api.rb', line 328 def exec_tran_cvs( = {}) name = "ExecTranCvs.idPass" required = [:access_id, :access_pass, :order_id, :convenience, :customer_name, :customer_kana, :tel_no, :receipts_disp_11, :receipts_disp_12, :receipts_disp_13] (required, ) post_request name, end |
#exec_tran_docomo(options = {}) ⇒ Object
【ドコモ払い決済】 18.1.2.2. 決済実行
385 386 387 388 389 390 |
# File 'lib/gmo/shop_api.rb', line 385 def exec_tran_docomo( = {}) name = "ExecTranDocomo.idPass" required = [:access_id, :access_pass, :order_id] (required, ) post_request name, end |
#exec_tran_edy(options = {}) ⇒ Object
【楽天Edy決済】 18.1.2.2. 決済実行
412 413 414 415 416 417 |
# File 'lib/gmo/shop_api.rb', line 412 def exec_tran_edy( = {}) name = "ExecTranEdy.idPass" required = [:access_id, :access_pass, :order_id, :mail_address] (required, ) post_request name, end |
#exec_tran_ganb(options = {}) ⇒ Object
【銀行振込(バーチャル口座 あおぞら)】 決済実行 登録された取引に対してバーチャル口座を発行します。
358 359 360 361 362 363 |
# File 'lib/gmo/shop_api.rb', line 358 def exec_tran_ganb( = {}) name = "ExecTranGANB.idPass" required = [:access_id, :access_pass, :order_id] (required, ) post_request name, end |
#exec_tran_linepay(options = {}) ⇒ Object
【LINE Pay決済】 20.1.2.2. 決済実行
367 368 369 370 371 372 |
# File 'lib/gmo/shop_api.rb', line 367 def exec_tran_linepay( = {}) name = "ExecTranLinepay.idPass" required = [:access_id, :access_pass, :order_id, :ret_url, :error_rcv_url, :product_name] (required, ) post_request name, end |
#exec_tran_pay_easy(options = {}) ⇒ Object
【Pay-easy決済】 5.1.2.2. 決済実行 お客様が入力した情報で後続の決済センターと通信を行い決済を実施し、結果を返します。
338 339 340 341 342 343 |
# File 'lib/gmo/shop_api.rb', line 338 def exec_tran_pay_easy( = {}) name = "ExecTranPayEasy.idPass" required = [:access_id, :access_pass, :order_id, :customer_name, :customer_kana, :tel_no, :receipts_disp_11, :receipts_disp_12, :receipts_disp_13] (required, ) post_request name, end |
#exec_tran_paypal(options = {}) ⇒ Object
【PayPal決済】 決済実行 PayPalと通信を行い決済要求結果を返します。
348 349 350 351 352 353 |
# File 'lib/gmo/shop_api.rb', line 348 def exec_tran_paypal( = {}) name = "ExecTranPaypal.idPass" required = [:access_id, :access_pass, :order_id, :item_name, :redirect_url] (required, ) post_request name, end |
#exec_tran_rakuten_id(options = {}) ⇒ Object
【楽天ペイ決済】 18.1.2.2. 決済実行
376 377 378 379 380 381 |
# File 'lib/gmo/shop_api.rb', line 376 def exec_tran_rakuten_id( = {}) name = "ExecTranRakutenId.idPass" required = [:access_id, :access_pass, :order_id] (required, ) post_request name, end |
#exec_tran_suica(options = {}) ⇒ Object
【モバイルSuica決済】 18.1.2.2. 決済実行
403 404 405 406 407 408 |
# File 'lib/gmo/shop_api.rb', line 403 def exec_tran_suica( = {}) name = "ExecTranSuica.idPass" required = [:access_id, :access_pass, :order_id, :item_name, :mail_address] (required, ) post_request name, end |
#exec_tran_virtualaccount(options = {}) ⇒ Object
【銀行振込(バーチャル口座)決済】 18.1.2.2. 決済実行
394 395 396 397 398 399 |
# File 'lib/gmo/shop_api.rb', line 394 def exec_tran_virtualaccount( = {}) name = "ExecTranVirtualaccount.idPass" required = [:access_id, :access_pass, :order_id, :trade_days] (required, ) post_request name, end |
#initialize(options = {}) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/gmo/shop_api.rb', line 19 def initialize( = {}) @shop_id = [:shop_id] @shop_pass = [:shop_pass] @host = [:host] @locale = .fetch(:locale, GMO::Const::DEFAULT_LOCALE) unless @shop_id && @shop_pass && @host raise ArgumentError, "Initialize must receive a hash with :shop_id, :shop_pass and either :host! (received #{.inspect})" end end |
#refund_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID Amount Tax AccessID AccessPass Status Forward Approve TranID TranDate example ### gmo.refund_tran_brandtoken(
access_id: "139f8ec33a07c55f406937c52ce4473d",
access_pass: "2689b204d2c17192fa35f9269fa7e744",
order_id: "597ae8c36120b23a3c00014e",
amount: 1000,
tax: "0001001"
)
> “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”, “Status”=>“RETURN”, “Forward”=>“2a99663”, “Approve”=>“5537883”, “TranID”=>“1707311620111111111111771220”, “TranDate”=>“20170731162256”
627 628 629 630 631 632 |
# File 'lib/gmo/shop_api.rb', line 627 def refund_tran_brandtoken( = {}) name = "RefundTranBrandtoken.idPass" required = [:access_id, :access_pass, :order_id, :amount] (required, ) post_request name, end |
#sales_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID Amount Tax AccessID AccessPass Status Forward Approve TranID TranDate example ### gmo.sales_tran_brandtoken(
access_id: "139f8ec33a07c55f406937c52ce4473d",
access_pass: "2689b204d2c17192fa35f9269fa7e744",
order_id: "597ae8c36120b23a3c00014e",
amount: 1000,
tax: "0001001"
)
> “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”, “Status”=>“SALES”, “Forward”=>“2a99663”, “Approve”=>“5537883”, “TranID”=>“1707311620111111111111771220”, “TranDate”=>“20170731162256”
597 598 599 600 601 602 |
# File 'lib/gmo/shop_api.rb', line 597 def sales_tran_brandtoken( = {}) name = "SalesTranBrandtoken.idPass" required = [:access_id, :access_pass, :order_id, :amount] (required, ) post_request name, end |
#search_trade(options = {}) ⇒ Object
2.16.2.1.取引状態参照 指定したオーダーID の取引情報を取得します。
646 647 648 649 650 651 |
# File 'lib/gmo/shop_api.rb', line 646 def search_trade( = {}) name = "SearchTrade.idPass" required = [:order_id] (required, ) post_request name, end |
#search_trade_multi(options = {}) ⇒ Object
13.1.2.1.取引状態参照 指定したオーダーIDの取引情報を取得します。 OrderID PayType OrderID Status ProcessDate JobCd AccessID AccessPass ItemCode Amount Tax SiteID MemberID CardNoToken Expire Method PayTimes Forward TranID Approve ClientField1 ClientField2 ClientField3 PayType example ### gmo.search_trade_multi(
order_id: '598066176120b2235300020b',
pay_type: 27
)
> “Status”=>“CAPTURE”, “ProcessDate”=>“20170801202929”, “JobCd”=>“CAPTURE”, “AccessID”=>“228fc5bc02da46943300c12706d325a2”, “AccessPass”=>“090a50ec2f77d92184a18018f07906e5”, “ItemCode”=>“0000990”, “Amount”=>“557”, “Tax”=>“0”, “SiteID”=>“”, “MemberID”=>“”, “CardNoToken”=>“************1111”, “Expire”=>“2212”, “Method”=>“1”, “PayTimes”=>“”, “Forward”=>“2a99663”, “TranID”=>“1708012029111111111111771228”, “Approve”=>“5689128”, “ClientField1”=>“”, “ClientField2”=>“”, “ClientField3”=>“”, “PayType”=>“27”
687 688 689 690 691 692 |
# File 'lib/gmo/shop_api.rb', line 687 def search_trade_multi( = {}) name = "SearchTradeMulti.idPass" required = [:order_id, :pay_type] (required, ) post_request name, end |
#secure_tran(options = {}) ⇒ Object
2.2.2.4 認証後決済実行
318 319 320 321 322 323 |
# File 'lib/gmo/shop_api.rb', line 318 def secure_tran( = {}) name = "SecureTran.idPass" required = [:pa_res, :md] (required, ) post_request name, end |
#void_tran_brandtoken(options = {}) ⇒ Object
AccessID AccessPass OrderID AccessID AccessPass Status Forward Approve TranID TranDate example ### gmo.void_tran_brandtoken(
access_id: "139f8ec33a07c55f406937c52ce4473d",
access_pass: "2689b204d2c17192fa35f9269fa7e744",
order_id: "597ae8c36120b23a3c00014e"
)
> “AccessPass”=>“2689b204d2c17192fa35f9269fa7e744”, “Status”=>“VOID”, “Forward”=>“2a99663”, “Approve”=>“5537590”, “TranID”=>“1707311610111111111111771219”, “TranDate”=>“20170731161007”
567 568 569 570 571 572 |
# File 'lib/gmo/shop_api.rb', line 567 def void_tran_brandtoken( = {}) name = "VoidTranBrandtoken.idPass" required = [:access_id, :access_pass, :order_id] (required, ) post_request name, end |