diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index fa8e3cf..6b9d143 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -8,7 +8,14 @@ name: Ruby on: - [push] + push: + branches: + - master + pull_request: + types: + - opened + - synchronize + - reopened permissions: contents: read @@ -16,9 +23,10 @@ permissions: jobs: test: runs-on: ubuntu-latest + timeout-minutes: 10 strategy: matrix: - ruby-version: ['2.6', '2.7', '3.0', '3.1'] + ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4'] steps: - uses: actions/checkout@v3 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f98eee8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: ruby -rvm: - - ruby-head - - 2.1 - - 2.2 - - 2.3 - - 2.4 - - 2.5 - - 2.6 - - 2.7 - - jruby-18mode - - jruby-19mode - - jruby-head -before_install: - - gem update bundler -matrix: - allow_failures: - - rvm: ruby-head - - rvm: jruby-18mode - - rvm: jruby-19mode - - rvm: jruby-head diff --git a/CHANGELOG.md b/CHANGELOG.md index d301780..435ef87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,26 @@ # CHANGELOG +## 0.5.9 +- net-http 0.7.0+でcontent typeを明示的に設定する必要がある問題を修正 [#79](https://github.com/t-k/gmo-payment-ruby/pull/79) (Thanks [@johnnyshields](https://github.com/johnnyshields)) + +## 0.5.8 +- クレジットカード決済の3Dセキュア2.0に対応 [#76](https://github.com/t-k/gmo-payment-ruby/pull/76) + - 3DS2.0認証実行 (`tds2_auth`) + - 3DS2.0認証結果取得 (`tds2_result`) + - 認証後決済実行 (`secure_tran_2`) +- Ruby 3.4のサポートを追加 [#74](https://github.com/t-k/gmo-payment-ruby/pull/74) (Thanks [@y-yagi](https://github.com/y-yagi)) +- `ostruct`を明示的な依存関係として追加 [#74](https://github.com/t-k/gmo-payment-ruby/pull/74) (Thanks [@y-yagi](https://github.com/y-yagi)) + +## 0.5.7 +- Added `nkf` as a dependency. This fixes the warning that appears with Ruby 3.3.0 and later versions. [#67](https://github.com/t-k/gmo-payment-ruby/pull/69) + +## 0.5.6 +- Support PayPal決済 [#63](https://github.com/t-k/gmo-payment-ruby/pull/63) +- Support 銀行振込(バーチャル口座 あおぞら)[#64](https://github.com/t-k/gmo-payment-ruby/pull/64) +- Update 送金サービス リンクタイプURL取得 [#65](https://github.com/t-k/gmo-payment-ruby/pull/65) +- Update 送金サービス メール送金指示 [#66](https://github.com/t-k/gmo-payment-ruby/pull/66) + +## 0.5.5 +- Enhanced encoding handling to prevent misjudgments during UTF-8 conversion [#57](https://github.com/t-k/gmo-payment-ruby/pull/57) (Thanks [@y-yagi](https://github.com/y-yagi)) ## 0.5.4 * Support 銀行振込(バーチャル口座)決済, モバイルSuica, 楽天Edy決済 [#53](https://github.com/t-k/gmo-payment-ruby/pull/53) (Thanks [@valda](https://github.com/valda)) diff --git a/Gemfile b/Gemfile index e69bbb8..6504f09 100644 --- a/Gemfile +++ b/Gemfile @@ -5,11 +5,10 @@ group :development do end group :development, :test do - if RUBY_VERSION >= "1.9.3" - gem 'guard' - gem 'guard-rspec' - end + gem 'guard' + gem 'guard-rspec' gem 'simplecov' + gem "pry" if RUBY_PLATFORM =~ /darwin/ gem "ruby_gntp" diff --git a/README.md b/README.md index 6299117..ef644e2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ GMO ==== -[![Gem Version](https://badge.fury.io/rb/gmo.png)](https://rubygems.org/gems/gmo) -[![Build Status](https://travis-ci.org/t-k/gmo-payment-ruby.png)](https://travis-ci.org/t-k/gmo-payment-ruby) +[![Gem Version](https://badge.fury.io/rb/gmo.svg)](https://badge.fury.io/rb/gmo) +[![Ruby](https://github.com/t-k/gmo-payment-ruby/actions/workflows/ruby.yml/badge.svg?branch=master)](https://github.com/t-k/gmo-payment-ruby/actions/workflows/ruby.yml) GMO is a Ruby client library for the GMO Payment Platform, supporting the PG Multi Payment API, exec transactions, register users, and so on. @@ -43,4 +43,4 @@ More documentation available ","Shop_Pass":""}' + headers: + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: '' + headers: + Server: + - nginx + Date: + - Mon, 09 Oct 2023 08:25:18 GMT + Content-Type: + - application/json;charset=UTF-8 + Content-Length: + - "177" + Connection: + - close + X-Content-Type-Options: + - nosniff + Cache-Control: + - no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Disposition: + - attachment;filename="LinkRedirectUrl.json" + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - "1; mode=block" + Strict-Transport-Security: + - max-age=63072000 + body: + encoding: UTF-8 + string: '{"Redirect_Url":"https:///mail/mail-deposit?token=7c0bbc6531f42138eca9b8caf63b7735b5ad8d2faf8fe2ede3c364fd71f88e85","Deposit_ID":"dep00001","Method":"1"}' + recorded_at: Mon, 09 Oct 2023 08:25:18 GMT +recorded_with: VCR 6.1.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_link_redirect_url_with_valid_options_gets_data_about_a_link_edirect_url.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_link_redirect_url_with_valid_options_gets_data_about_a_link_edirect_url.yml new file mode 100644 index 0000000..cbab266 --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_link_redirect_url_with_valid_options_gets_data_about_a_link_edirect_url.yml @@ -0,0 +1,103 @@ +--- +http_interactions: +- request: + method: post + uri: https:///api/shop/LinkRedirectUrl.json + body: + encoding: UTF-8 + string: '{"Deposit_ID":"dep00001","Call_Back_Url":"https://example.com/callback","Amount":"100","Auth_Code":"AUTH001","Shop_ID":"","Shop_Pass":""}' + headers: + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: '' + headers: + Server: + - nginx + Date: + - Mon, 09 Oct 2023 08:25:18 GMT + Content-Type: + - application/json;charset=UTF-8 + Content-Length: + - "177" + Connection: + - close + X-Content-Type-Options: + - nosniff + Cache-Control: + - no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Disposition: + - attachment;filename="LinkRedirectUrl.json" + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - "1; mode=block" + Strict-Transport-Security: + - max-age=63072000 + body: + encoding: UTF-8 + string: '{"Redirect_Url":"https:///mail/mail-deposit?token=cbc777b18666b7aa21f42e98fa972c493530c3d5d6bfd9125b262075512bf285","Deposit_ID":"dep00001","Method":"1"}' + recorded_at: Mon, 09 Oct 2023 08:25:18 GMT +- request: + method: post + uri: https:///api/shop/LinkRedirectUrl.json + body: + encoding: UTF-8 + string: '{"Deposit_ID":"dep00001","Method":2,"Shop_ID":"","Shop_Pass":""}' + headers: + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: '' + headers: + Server: + - nginx + Date: + - Mon, 09 Oct 2023 08:26:00 GMT + Content-Type: + - application/json;charset=UTF-8 + Content-Length: + - '38' + Connection: + - close + X-Content-Type-Options: + - nosniff + Cache-Control: + - no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Disposition: + - attachment;filename="LinkRedirectUrl.json" + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - "1; mode=block" + Strict-Transport-Security: + - max-age=63072000 + body: + encoding: UTF-8 + string: '{"Deposit_ID":"dep00001","Method":"2"}' + recorded_at: Mon, 09 Oct 2023 08:26:00 GMT +recorded_with: VCR 6.1.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_mail_deposit_gets_data_about_a_mail_deposit.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_mail_deposit_gets_data_about_a_mail_deposit.yml index 028741e..206ca76 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_mail_deposit_gets_data_about_a_mail_deposit.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_cancel_mail_deposit_gets_data_about_a_mail_deposit.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///api/MailDepositRegistration.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: Deposit_ID=dep0000&Method=2&Shop_ID=&Shop_Pass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: X-Frame-Options: - SAMEORIGIN body: - encoding: UTF-8 + encoding: Windows-31J string: Deposit_ID=dep00001&Method=2 http_version: recorded_at: Mon, 01 May 2017 05:58:28 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_account_gets_data_about_an_account.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_account_gets_data_about_an_account.yml index a4e06be..86ab36e 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_account_gets_data_about_an_account.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_account_gets_data_about_an_account.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///api/AccountRegistration.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: Bank_ID=bank0000&Bank_Code=000&Branch_Code=83&Account_Type=&Account_Name=An+Yutzy&Account_Number=002345&Branch_Code_Jpbank=00567&Account_Number_Jpbank=0234567&Free=foobar&Method=&Shop_ID=&Shop_Pass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: X-Frame-Options: - SAMEORIGIN body: - encoding: UTF-8 + encoding: Windows-31J string: Bank_ID=bank00001&Method=1 http_version: recorded_at: Mon, 01 May 2017 05:58:18 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_deposit_gets_data_about_a_deposit.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_deposit_gets_data_about_a_deposit.yml index 153562b..61767af 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_deposit_gets_data_about_a_deposit.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_deposit_gets_data_about_a_deposit.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///api/DepositRegistration.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: Bank_ID=bank0000&Deposit_ID=dep0000&Amount=000&Method=&Shop_ID=&Shop_Pass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: X-Frame-Options: - SAMEORIGIN body: - encoding: UTF-8 + encoding: Windows-31J string: Deposit_ID=dep00000&Bank_ID=bank00000&Method=1&Amount=1000&Bank_Fee=27 http_version: recorded_at: Mon, 01 May 2017 05:58:23 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_link_redirect_url_with_valid_options_gets_data_about_link_redirect_url.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_link_redirect_url_with_valid_options_gets_data_about_link_redirect_url.yml new file mode 100644 index 0000000..920063a --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_link_redirect_url_with_valid_options_gets_data_about_link_redirect_url.yml @@ -0,0 +1,53 @@ +--- +http_interactions: +- request: + method: post + uri: https:///api/shop/LinkRedirectUrl.json + body: + encoding: UTF-8 + string: '{"Deposit_ID":"dep00001","Amount":"1000","Auth_Code":"auth00001","Call_Back_Url":"https://example.com/callback","Shop_ID":"","Shop_Pass":""}' + headers: + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: '' + headers: + Server: + - nginx + Date: + - Fri, 06 Oct 2023 10:30:26 GMT + Content-Type: + - application/json;charset=UTF-8 + Content-Length: + - "177" + Connection: + - close + X-Content-Type-Options: + - nosniff + Cache-Control: + - no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + Content-Disposition: + - attachment;filename="LinkRedirectUrl.json" + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - "1; mode=block" + Strict-Transport-Security: + - max-age=63072000 + body: + encoding: UTF-8 + string: '{"Redirect_Url":"https:///mail/mail-deposit?token=cfd81440aef67210b6f3eccf3cb8e7d7020013d67108ca4d13d1ca897fb0d0f6","Deposit_ID":"dep00001","Method":"1"}' + recorded_at: Fri, 06 Oct 2023 10:30:26 GMT +recorded_with: VCR 6.1.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_gets_data_about_a_mail_deposit.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_gets_data_about_a_mail_deposit.yml deleted file mode 100644 index b4ee4be..0000000 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_gets_data_about_a_mail_deposit.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -http_interactions: -- request: - method: post - uri: https:///api/MailDepositRegistration.idPass - body: - encoding: UTF-8 - string: Deposit_ID=dep0000&Mail_Address=anyutzy%40demo.com&Amount=000&Mail_Deposit_Account_Name=An+Yutzy&Expire=5&Shop_Mail_Address=anyutzy%40demo.com&Method=&Shop_ID=&Shop_Pass= - headers: - Accept-Encoding: - - gzip;q=.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - User-Agent: - - Ruby - response: - status: - code: 200 - message: OK - headers: - Server: - - nginx - Date: - - Mon, 0 May 207 05:58:27 GMT - Content-Type: - - text/plain;charset=Windows-3J - Transfer-Encoding: - - chunked - Connection: - - close - X-Frame-Options: - - SAMEORIGIN - body: - encoding: UTF-8 - string: Deposit_ID=dep00001&Method=1&Amount=1000&Expire=20170503 - http_version: - recorded_at: Mon, 01 May 2017 05:58:27 GMT -recorded_with: VCR 3.0.3 diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_with_valid_options_gets_data_about_a_mail_deposit.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_with_valid_options_gets_data_about_a_mail_deposit.yml new file mode 100644 index 0000000..ffe5166 --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_with_valid_options_gets_data_about_a_mail_deposit.yml @@ -0,0 +1,47 @@ +--- +http_interactions: +- request: + method: post + uri: https:///api/MailDepositRegistration.idPass + body: + encoding: UTF-8 + string: Deposit_ID=dep00001&Mail_Address=anyutzy%40demo.com&Amount=1000&Mail_Deposit_Account_Name=An+Yutzy&Expire=5&Shop_Mail_Address=anyutzy%40demo.com&Auth_Code=auth00001&Auth_Code2=auth00002&Auth_Code3=auth00003&Remit_Method_Bank=1&Mail_Template_Free1=mail_template_free_1&Mail_Template_Free2=mail_template_free_2&Mail_Template_Free3=mail_template_free_3&Mail_Template_Number=1&Bank_ID=bank_id00001&Select_Key=select00001&Client_Name=%83C%83%89%83C%83j%83%93%83%5E%83%8D%83E&Method=1&Shop_ID=&Shop_Pass= + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: '' + headers: + Server: + - nginx + Date: + - Thu, 12 Oct 2023 07:13:06 GMT + Content-Type: + - text/plain;charset=windows-31j + Content-Length: + - '56' + Connection: + - close + Cache-Control: + - no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - "1; mode=block" + Strict-Transport-Security: + - max-age=63072000 + body: + encoding: UTF-8 + string: Deposit_ID=dep00001&Method=1&Amount=1000&Expire=20231018 + recorded_at: Thu, 12 Oct 2023 07:13:06 GMT +recorded_with: VCR 6.1.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_with_valid_options_makes_request_with_correct_parameters.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_with_valid_options_makes_request_with_correct_parameters.yml new file mode 100644 index 0000000..ffe5166 --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_create_mail_deposit_with_valid_options_makes_request_with_correct_parameters.yml @@ -0,0 +1,47 @@ +--- +http_interactions: +- request: + method: post + uri: https:///api/MailDepositRegistration.idPass + body: + encoding: UTF-8 + string: Deposit_ID=dep00001&Mail_Address=anyutzy%40demo.com&Amount=1000&Mail_Deposit_Account_Name=An+Yutzy&Expire=5&Shop_Mail_Address=anyutzy%40demo.com&Auth_Code=auth00001&Auth_Code2=auth00002&Auth_Code3=auth00003&Remit_Method_Bank=1&Mail_Template_Free1=mail_template_free_1&Mail_Template_Free2=mail_template_free_2&Mail_Template_Free3=mail_template_free_3&Mail_Template_Number=1&Bank_ID=bank_id00001&Select_Key=select00001&Client_Name=%83C%83%89%83C%83j%83%93%83%5E%83%8D%83E&Method=1&Shop_ID=&Shop_Pass= + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: '' + headers: + Server: + - nginx + Date: + - Thu, 12 Oct 2023 07:13:06 GMT + Content-Type: + - text/plain;charset=windows-31j + Content-Length: + - '56' + Connection: + - close + Cache-Control: + - no-cache, no-store + Pragma: + - no-cache + Expires: + - '0' + X-Frame-Options: + - SAMEORIGIN + X-Xss-Protection: + - "1; mode=block" + Strict-Transport-Security: + - max-age=63072000 + body: + encoding: UTF-8 + string: Deposit_ID=dep00001&Method=1&Amount=1000&Expire=20231018 + recorded_at: Thu, 12 Oct 2023 07:13:06 GMT +recorded_with: VCR 6.1.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_delete_account_gets_data_about_an_account.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_delete_account_gets_data_about_an_account.yml index a8588a6..770f9fa 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_delete_account_gets_data_about_an_account.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_delete_account_gets_data_about_an_account.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///api/AccountRegistration.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: Bank_ID=bank0000&Method=3&Shop_ID=&Shop_Pass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: X-Frame-Options: - SAMEORIGIN body: - encoding: UTF-8 + encoding: Windows-31J string: Bank_ID=bank00001&Method=3 http_version: recorded_at: Mon, 01 May 2017 05:58:20 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_account_gets_data_about_an_account.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_account_gets_data_about_an_account.yml index e3eee6b..fddbb39 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_account_gets_data_about_an_account.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_account_gets_data_about_an_account.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///api/AccountSearch.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: Bank_ID=bank0000&Shop_ID=&Shop_Pass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: X-Frame-Options: - SAMEORIGIN body: - encoding: UTF-8 + encoding: Windows-31J string: Bank_ID=bank12345&Delete_Flag=0&Bank_Name=みずほ銀行&Bank_Code=0001&Branch_Name=札幌支店&Branch_Code=813&Account_Type=1&Account_Number=0012345&Account_Name=An Yutzy&Free=&Branch_Code_Jpbank=&Account_Number_Jpbank= http_version: recorded_at: Mon, 01 May 2017 05:58:21 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_balance_gets_data_about_balance.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_balance_gets_data_about_balance.yml index 2864497..f8adab2 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_balance_gets_data_about_balance.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_balance_gets_data_about_balance.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///api/BalanceSearch.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: Shop_ID=&Shop_Pass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: X-Frame-Options: - SAMEORIGIN body: - encoding: UTF-8 + encoding: Windows-31J string: Shop_ID=rshop00000071&Balance=9818965&Balance_Forecast=9818965 http_version: recorded_at: Mon, 01 May 2017 05:58:26 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_deposit_gets_data_about_a_deposit.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_deposit_gets_data_about_a_deposit.yml index e98c228..c6f09f5 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_deposit_gets_data_about_a_deposit.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_deposit_gets_data_about_a_deposit.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///api/DepositSearch.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: Deposit_ID=dep0000&Shop_ID=&Shop_Pass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: X-Frame-Options: - SAMEORIGIN body: - encoding: UTF-8 + encoding: Windows-31J string: Deposit_ID=dep00000&Bank_ID=bank163144&Bank_Name=みずほ銀行&Bank_Code=0001&Branch_Name=札幌支店&Branch_Code=813&Account_Type=1&Account_Number=0012345&Account_Name=An Yutzy&Free=&Amount=181035&Bank_Fee=270&Result=0&Branch_Code_Jpbank=&Account_Number_Jpbank=&Deposit_Date=&Result_Detail= http_version: recorded_at: Mon, 01 May 2017 05:58:25 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_mail_deposit_gets_data_about_a_mail_deposit.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_mail_deposit_gets_data_about_a_mail_deposit.yml index f6540f9..434da25 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_mail_deposit_gets_data_about_a_mail_deposit.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_search_mail_deposit_gets_data_about_a_mail_deposit.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///api/MailDepositSearch.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: Deposit_ID=dep0000&Shop_ID=&Shop_Pass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: X-Frame-Options: - SAMEORIGIN body: - encoding: UTF-8 + encoding: Windows-31J string: Deposit_ID=dep00001&Mail_Address=anyutzy+test@demo.com&Shop_Mail_Address=anyutzy@demo.com&Account_Name=An Yutzy&Amount=1000&Expire=20170503&Status=0 http_version: recorded_at: Mon, 01 May 2017 05:58:30 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_update_account_gets_data_about_an_account.yml b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_update_account_gets_data_about_an_account.yml index d3fe678..1a0c9f7 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_update_account_gets_data_about_an_account.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_RemittanceAPI/_update_account_gets_data_about_an_account.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///api/AccountRegistration.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: Bank_ID=bank0000&Bank_Code=000&Branch_Code=83&Account_Type=&Account_Name=An+Yutzy&Account_Number=002345&Branch_Code_Jpbank=00567&Account_Number_Jpbank=0234567&Free=foobar&Method=2&Shop_ID=&Shop_Pass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: X-Frame-Options: - SAMEORIGIN body: - encoding: UTF-8 + encoding: Windows-31J string: Bank_ID=bank00001&Method=2 http_version: recorded_at: Mon, 01 May 2017 05:58:19 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_change_order_auth_to_sale.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_change_order_auth_to_sale.yml index b556a29..7e5b573 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_change_order_auth_to_sale.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_change_order_auth_to_sale.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106775&JobCd=AUTH&Amount=100&ShopID=&ShopPass= headers: Accept: @@ -33,7 +33,7 @@ http_interactions: method: post uri: https:///payment/ExecTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=675a12f12bb3bbf57aeb67acabfccecf&AccessPass=63144577f7f84c800fa2001cb7495f34&OrderID=1362106775&Method=1&PayTimes=1&CardNo=4111111111111111&Expire=1405&HttpAccept=null&HttpUserAgent=null&DeviceCategory=0&ClientField1=null&ClientField2=null&ClientField3=null&ClientFieldFlag=0&ShopID=&ShopPass= headers: Accept: @@ -62,7 +62,7 @@ http_interactions: method: post uri: https:///payment/AlterTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=675a12f12bb3bbf57aeb67acabfccecf&AccessPass=63144577f7f84c800fa2001cb7495f34&JobCd=SALES&Amount=100&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_gets_data_about_order.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_gets_data_about_order.yml index 3bc70a5..3c44533 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_gets_data_about_order.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_gets_data_about_order.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106773&JobCd=AUTH&Amount=100&ShopID=&ShopPass= headers: Accept: @@ -33,7 +33,7 @@ http_interactions: method: post uri: https:///payment/ExecTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=f51483bb5892e25754eb85207a582b3c&AccessPass=07acabfd75965a1141fb9099080a8975&OrderID=1362106773&Method=1&PayTimes=1&CardNo=4111111111111111&Expire=1405&HttpAccept=null&HttpUserAgent=null&DeviceCategory=0&ClientField1=null&ClientField2=null&ClientField3=null&ClientFieldFlag=0&ShopID=&ShopPass= headers: Accept: @@ -62,7 +62,7 @@ http_interactions: method: post uri: https:///payment/AlterTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=f51483bb5892e25754eb85207a582b3c&AccessPass=07acabfd75965a1141fb9099080a8975&JobCd=RETURN&Amount=100&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_got_error_if_missing_options.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_got_error_if_missing_options.yml index 3566063..0112594 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_got_error_if_missing_options.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_alter_tran_got_error_if_missing_options.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/AlterTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=null&AccessPass=null&JobCd=SALES&Amount=null&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_brandtoken_gets_data_about_order.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_brandtoken_gets_data_about_order.yml index c7bfd76..9ed6c84 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_brandtoken_gets_data_about_order.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_brandtoken_gets_data_about_order.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=5028893&JobCd=AUTH&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f http_version: recorded_at: Tue, 08 Aug 2017 10:41:55 GMT @@ -39,7 +39,7 @@ http_interactions: method: post uri: https:///payment/ExecTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50278987&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&TokenType=APay&Token=base64encodedtoken&ClientField=client_field&ShopID=&ShopPass= headers: Accept-Encoding: @@ -66,7 +66,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: Status=AUTH&OrderID=597ae8c3620b23a3c0004e&Forward=2a99663&Approve=5487394&TranID=707286347726&TranDate=207072863453&ClientField=client_field&ClientField2=&ClientField3= http_version: recorded_at: Tue, 08 Aug 2017 07:56:28 GMT @@ -74,7 +74,7 @@ http_interactions: method: post uri: https:///payment/ChangeTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50289054&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&JobCd=CAPTURE&Amount=500&ShopID=&ShopPass= headers: Accept-Encoding: @@ -101,7 +101,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=21170701482c86c3b88ff72b83bfd363&AccessPass=51f36feba120de1e6e29532e5a3a5e3e&Status=CAPTURE&Forward=2a99663&Approve=5538477&TranID=1707311633111111111111771224&TranDate=20170731163343 http_version: recorded_at: Tue, 08 Aug 2017 10:44:15 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_gets_data_about_order.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_gets_data_about_order.yml index b166520..a83d0cc 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_gets_data_about_order.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_gets_data_about_order.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106777&JobCd=AUTH&Amount=100&ShopID=&ShopPass= headers: Accept: @@ -33,7 +33,7 @@ http_interactions: method: post uri: https:///payment/ExecTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=53423389f2059b97ab86faa87ccf5ebc&AccessPass=7e0c971d8b63bd6924f88caec7dd056a&OrderID=1362106777&Method=1&PayTimes=1&CardNo=4111111111111111&Expire=1405&HttpAccept=null&HttpUserAgent=null&DeviceCategory=0&ClientField1=null&ClientField2=null&ClientField3=null&ClientFieldFlag=0&ShopID=&ShopPass= headers: Accept: @@ -62,7 +62,7 @@ http_interactions: method: post uri: https:///payment/ChangeTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=53423389f2059b97ab86faa87ccf5ebc&AccessPass=7e0c971d8b63bd6924f88caec7dd056a&JobCd=AUTH&Amount=1000&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_got_error_if_missing_options.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_got_error_if_missing_options.yml index d817f4b..3e9ae8c 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_got_error_if_missing_options.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_change_tran_got_error_if_missing_options.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SearchTradeMulti.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=null&PayType=null&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_cvs_cancel_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_cvs_cancel_gets_data_about_a_transaction.yml index 89d8321..670f1b3 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_cvs_cancel_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_cvs_cancel_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranCvs.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106772&Amount=100&ShopID=&ShopPass= headers: Accept: @@ -33,7 +33,7 @@ http_interactions: method: post uri: https:///payment/CvsCancel.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1365660033&AccessID=3618be802c7ac572414274731e50cb6c&AccessPass=4099664bd4b110800e09805539d1d7b5&ShopID=&ShopPass= headers: Accept-Encoding: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_brandtoken_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_brandtoken_gets_data_about_a_transaction.yml index fb93629..c955cac 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_brandtoken_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_brandtoken_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50277398&JobCd=AUTH&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f http_version: recorded_at: Tue, 08 Aug 2017 07:29:59 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_gets_data_about_a_transaction.yml index 9c0f59e..a33ee1e 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranCvs.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106772&Amount=100&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_got_error_if_missing_options.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_got_error_if_missing_options.yml index ceaa952..ae46f15 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_got_error_if_missing_options.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_cvs_got_error_if_missing_options.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranCvs.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=null&JobCd=null&Amount=null&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_docomo_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_docomo_gets_data_about_a_transaction.yml index 27fb64d..3f0d7eb 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_docomo_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_docomo_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranDocomo.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=60922503&JobCd=AUTH&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=bcda2c8fbc9525dd37ad8f2a37facf&AccessPass=fd3337495ade97b962bb7cb9228b58 recorded_at: Tue, 29 Dec 2020 06:56:54 GMT recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_edy_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_edy_gets_data_about_a_transaction.yml index 25474b3..9d5097b 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_edy_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_edy_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranEdy.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=662969828&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=63bff23f2cb9bfc9c528fd82f03d04e&AccessPass=509ced83bb0acd48c958f3baff94452 recorded_at: Mon, 12 Sep 2022 08:03:49 GMT recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_ganb_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_ganb_gets_data_about_a_transaction.yml new file mode 100644 index 0000000..7d21099 --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_ganb_gets_data_about_a_transaction.yml @@ -0,0 +1,35 @@ +--- +http_interactions: +- request: + method: post + uri: https:///payment/EntryTranGANB.idPass + body: + encoding: UTF-8 + string: OrderID=1696341308&Amount=100&ShopID=&ShopPass= + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Tue, 03 Oct 2023 13:55:08 GMT + Content-Type: + - text/plain;charset=Shift_JIS + Transfer-Encoding: + - chunked + Connection: + - close + body: + encoding: UTF-8 + string: OrderID=1696341308&AccessID=e297cc560cc91e226d0affef26f9ca10&AccessPass=e81b3b1af08488e16d73dcf5e0ecd6b0 + recorded_at: Tue, 03 Oct 2023 13:55:08 GMT +recorded_with: VCR 6.1.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_gets_data_about_a_transaction.yml index 654eadf..c1b8f69 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106772&JobCd=AUTH&Amount=100&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_got_error_if_missing_options.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_got_error_if_missing_options.yml index b7e315a..e594e00 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_got_error_if_missing_options.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_got_error_if_missing_options.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=null&JobCd=null&Amount=null&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_linepay_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_linepay_gets_data_about_a_transaction.yml index e883b31..564cf3d 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_linepay_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_linepay_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranLinepay.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1467366013&JobCd=CAPTURE&Amount=100&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1467366013&AccessID=2eb607a4a86106c53f8748e59de5d41b&AccessPass=3fb30254d3e3e6b4efbfe6eedda7196d http_version: recorded_at: Fri, 01 Jul 2016 09:40:14 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_pay_easy_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_pay_easy_gets_data_about_a_transaction.yml index efcd68c..0d65b66 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_pay_easy_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_pay_easy_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranPayEasy.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1448103619&Amount=100&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=282b61afb9cabee8e72d49db77c08e2f&AccessPass=9c4883358947a15683f8a63f5fc7aef4 http_version: recorded_at: Sat, 21 Nov 2015 11:00:19 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_paypal_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_paypal_gets_data_about_a_transaction.yml new file mode 100644 index 0000000..43a58ec --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_paypal_gets_data_about_a_transaction.yml @@ -0,0 +1,35 @@ +--- +http_interactions: +- request: + method: post + uri: https:///payment/EntryTranPaypal.idPass + body: + encoding: UTF-8 + string: OrderID=1665961543&JobCd=CAPTURE&Amount=100&ShopID=&ShopPass= + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sun, 16 Oct 2022 23:05:43 GMT + Content-Type: + - text/plain;charset=Windows-31J + Transfer-Encoding: + - chunked + Connection: + - close + body: + encoding: UTF-8 + string: OrderID=1665961543&AccessID=37dc5228bcca9474fbe7cc4c911e898b&AccessPass=f59990590602293bd9b1aefdde90bf8c + recorded_at: Sun, 16 Oct 2022 23:05:43 GMT +recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_rakuten_id_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_rakuten_id_gets_data_about_a_transaction.yml index 78a9e28..2186e6a 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_rakuten_id_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_rakuten_id_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranRakutenId.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=60922240&JobCd=AUTH&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=60922240&AccessID=8e9d8824c386409e247ebbadf34ff68&AccessPass=c963bd080cebf5c0869feefa638ddb recorded_at: Tue, 29 Dec 2020 06:09:00 GMT recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_suica_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_suica_gets_data_about_a_transaction.yml index d8f73d0..4b05c11 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_suica_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_suica_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranSuica.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=662969828&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=63bff23f2cb9bfc9c528fd82f03d04e&AccessPass=473707429075004e2a4f74fbca48db recorded_at: Mon, 12 Sep 2022 08:03:48 GMT recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_virtualaccount_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_virtualaccount_gets_data_about_a_transaction.yml index 06c82f8..0cee537 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_virtualaccount_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_entry_tran_virtualaccount_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranVirtualaccount.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=66262284&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=66262284&AccessID=672560ef8bfede4aece2bdd43a66dd59&AccessPass=b436e6b362b89c622f266be43b290 recorded_at: Thu, 08 Sep 2022 07:14:44 GMT recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_gets_data_about_a_transaction.yml index 940f43e..a81bec7 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50278834&JobCd=AUTH&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f http_version: recorded_at: Tue, 08 Aug 2017 07:53:55 GMT @@ -39,7 +39,7 @@ http_interactions: method: post uri: https:///payment/ExecTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50278987&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&TokenType=APay&Token=base64encodedtoken&ClientField=client_field&ShopID=&ShopPass= headers: Accept-Encoding: @@ -66,7 +66,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: Status=AUTH&OrderID=597ae8c36120b23a3c00014e&Forward=2a99663&Approve=5487394&TranID=1707281634111111111111771216&TranDate=20170728163453&ClientField1=client_field1&ClientField2=&ClientField3= http_version: recorded_at: Tue, 08 Aug 2017 07:56:28 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml index 1dc1637..be8f0b4 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_brandtoken_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50278988&JobCd=AUTH&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f http_version: recorded_at: Tue, 08 Aug 2017 07:56:29 GMT @@ -39,7 +39,7 @@ http_interactions: method: post uri: https:///payment/ExecTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50278987&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&TokenType=APay&Token=base64encodedtoken&ClientField=client_field&ShopID=&ShopPass= headers: Accept-Encoding: @@ -66,8 +66,8 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 - string: Status=AUTH&OrderID=597ae8c36120b23a3c00014e&Forward=2a99663&Approve=5487394&TranID=1707281634111111111111771216&TranDate=20170728163453&ClientField1=〜−¢£¬−‖①ほげほげhogehoge&ClientField2=&ClientField3= + encoding: Windows-31J + string: Status=AUTH&OrderID=597ae8c36120b23a3c00014e&Forward=2a99663&Approve=5487394&TranID=1707281634111111111111771216&TranDate=20170728163453&ClientField1=カソウシテン&ClientField2=&ClientField3= http_version: recorded_at: Tue, 08 Aug 2017 07:56:28 GMT recorded_with: VCR 3.0.3 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_cvs_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_cvs_gets_data_about_a_transaction.yml index ea35130..6228918 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_cvs_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_cvs_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranCvs.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106772&Amount=100&ShopID=&ShopPass= headers: Accept: @@ -33,7 +33,7 @@ http_interactions: method: post uri: https:///payment/ExecTranCvs.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1365660033&AccessID=3618be802c7ac572414274731e50cb6c&AccessPass=4099664bd4b110800e09805539d1d7b5&Convenience=00001&CustomerName=%E3%82%B3%E3%83%B3%E3%83%93%E3%83%8B%E5%A4%AA%E9%83%8E&CustomerKana=%E3%82%B3%E3%83%B3%E3%83%93%E3%83%8B%E3%82%BF%E3%83%AD%E3%82%A6&TelNo=0300000001&ReceiptsDisp11=RSpec+Helpdesk&ReceiptsDisp12=RSpec+hotline&ReceiptsDisp13=00%3A00-00%3A15&ClientField1=client_field1&ShopID=&ShopPass= headers: Accept-Encoding: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_docomo_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_docomo_gets_data_about_a_transaction.yml index 8b67532..c7e115c 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_docomo_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_docomo_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranDocomo.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=60922504&JobCd=CAPTURE&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,14 +29,14 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=980acf8a58ea72828f82b5cab36b4&AccessPass=30e8776420ef72d743e923f60c228 recorded_at: Tue, 29 Dec 2020 06:56:54 GMT - request: method: post uri: https:///payment/ExecTranDocomo.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=60922504&AccessID=980acf8a58ea72828f82b5cab36b4&AccessPass=30e8776420ef72d743e923f60c228&RetURL=https%3A%2F%2Fexample.com%2Fpath%2Fto%2Freturn%2Fsuccess&ErrorRcvURL=https%3A%2F%2Fexample.com%2Fpath%2Fto%2Freturn%2Ffailure&ItemId=000&ItemName=%8Dw%93%FC%82%B7%82%E9%8F%A4%95i%96%BC&ShopID=&ShopPass= headers: Accept-Encoding: @@ -61,7 +61,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=980acf8a58ea72828f82b5cab36b4&Token=MUPNG5Kkc3cF3W2yFjT6DXACIf+qnh7bqaBFFxarXKwBS7yYvxSiC0zeMVH+O4F&StartURL=https:///payment/DocomoStart.idPass&StartLimitDate=202022955854 recorded_at: Tue, 29 Dec 2020 06:56:55 GMT recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_doesn_t_require_card_info_if_token_is_present.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_doesn_t_require_card_info_if_token_is_present.yml index efbcdfe..db94225 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_doesn_t_require_card_info_if_token_is_present.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_doesn_t_require_card_info_if_token_is_present.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1516092147&JobCd=AUTH&Amount=100&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=fda0ae7f80d8f8855cb9f2229e22117a&AccessPass=a2a2b20bc81475e33573af93ece908cf http_version: recorded_at: Tue, 16 Jan 2018 08:42:28 GMT @@ -37,7 +37,7 @@ http_interactions: method: post uri: https:///payment/ExecTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1516092147&AccessID=fda0ae7f80d8f8855cb9f2229e22117a&AccessPass=a2a2b20bc81475e33573af93ece908cf&Method=1&PayTimes=1&Token=onetimetokenfromgmo&ClientFieldFlag=0&DeviceCategory=0&ShopID=&ShopPass= headers: Accept-Encoding: @@ -62,7 +62,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: ErrCode=EX1&ErrInfo=EX1000301 http_version: recorded_at: Tue, 16 Jan 2018 08:42:28 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_edy_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_edy_gets_data_about_a_transaction.yml index 8797bcf..91e635d 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_edy_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_edy_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranEdy.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=662970040&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,14 +29,14 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=e85e402df4ae23036f6de940c4eb2d7&AccessPass=6440b8df892f0a2dba3cb203805 recorded_at: Mon, 12 Sep 2022 08:07:20 GMT - request: method: post uri: https:///payment/ExecTranEdy.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=662970040&AccessID=e85e402df4ae23036f6de940c4eb2d7&AccessPass=6440b8df892f0a2dba3cb203805&MailAddress=test%40example.com&ClientField=client_field&ClientFieldFlag=&ShopID=&ShopPass= headers: Accept-Encoding: @@ -61,7 +61,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=662970040&ReceiptNo=EDY662970042705&EdyOrderNo=662970040-2209204852&PaymentTerm=2022092270722&TranDate=202209270722&CheckString=8db002858a8d3b8eaf4b3e7a2cd20&ClientField=client_field&ClientField2=&ClientField3= recorded_at: Mon, 12 Sep 2022 08:07:23 GMT recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_ganb_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_ganb_gets_data_about_a_transaction.yml new file mode 100644 index 0000000..c49cae1 --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_ganb_gets_data_about_a_transaction.yml @@ -0,0 +1,68 @@ +--- +http_interactions: +- request: + method: post + uri: https:///payment/EntryTranGANB.idPass + body: + encoding: UTF-8 + string: OrderID=1696418445&Amount=100&ShopID=&ShopPass= + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 04 Oct 2023 11:20:50 GMT + Content-Type: + - text/plain;charset=Shift_JIS + Transfer-Encoding: + - chunked + Connection: + - close + body: + encoding: UTF-8 + string: OrderID=1696418445&AccessID=ef73b56f6daf8fb36fa8e0a2133a0613&AccessPass=f9e832b3b9c886b70d98c5e857571033 + recorded_at: Wed, 04 Oct 2023 11:20:45 GMT +- request: + method: post + uri: https:///payment/ExecTranGANB.idPass + body: + encoding: UTF-8 + string: OrderID=1696418445&AccessID=ef73b56f6daf8fb36fa8e0a2133a0613&AccessPass=f9e832b3b9c886b70d98c5e857571033&ClientField1=%89%C1%96%BF%93X%8E%A9%97R%8D%80%96%DA1%82%C5%82%B7%81B&ClientField2=%89%C1%96%BF%93X%8E%A9%97R%8D%80%96%DA2%82%C5%82%B7%81B&ClientField3=%89%C1%96%BF%93X%8E%A9%97R%8D%80%96%DA3%82%C5%82%B7%81B&=irai%40example.com&TradeDays=3&TradeReason=%8E%E6%88%F8%8E%96%97R%82%C5%82%B7%81B&TradeClientName=%88%CB%97%8A%89%D4%8Eq&ShopID=&ShopPass= + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Wed, 04 Oct 2023 11:21:05 GMT + Content-Type: + - text/plain;charset=Shift_JIS + Transfer-Encoding: + - chunked + Connection: + - close + body: + encoding: ASCII-8BIT + string: !binary |- + QWNjZXNzSUQ9ZWY3M2I1NmY2ZGFmOGZiMzZmYThlMGEyPFRPS0VOPjMzYTA2PFRPS0VOPjMmQmFua0NvZGU9MDM8VE9LRU4+MCZCYW5rTmFtZT283i200bUtsbW/3tfIwsQmQnJhbmNoQ29kZT01MDMmQnJhbmNoTmFtZT22v7O8w90mQWNjb3VudFR5cGU9PFRPS0VOPiZBY2NvdW50TnVtYmVyPTg5Mjk2OTYmQWNjb3VudEhvbGRlck5hbWU9w73EvK6vzN8mQXZhaWxhYmxlRGF0ZT0yMDIzPFRPS0VOPjAwNw== + recorded_at: Wed, 04 Oct 2023 11:21:00 GMT +recorded_with: VCR 6.1.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_gets_data_about_a_transaction.yml index 0946026..fe43313 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106991&JobCd=AUTH&Amount=100&ShopID=&ShopPass= headers: Accept: @@ -33,7 +33,7 @@ http_interactions: method: post uri: https:///payment/ExecTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=e65385d62b5e5e9be64d2c8cecdb24f2&AccessPass=a79882df473a228fd2a00051e72642be&OrderID=1362106991&Method=1&PayTimes=1&CardNo=4111111111111111&Expire=1405&HttpAccept=null&HttpUserAgent=null&DeviceCategory=0&ClientField1=client_field1&ClientField2=null&ClientField3=null&ClientFieldFlag=1&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_got_error_if_missing_options.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_got_error_if_missing_options.yml index a4e757b..cc5f562 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_got_error_if_missing_options.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_got_error_if_missing_options.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/ExecTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=null&AccessPass=null&OrderID=null&Method=null&PayTimes=null&CardNo=null&Expire=null&HttpAccept=null&HttpUserAgent=null&DeviceCategory=0&ClientField1=null&ClientField2=null&ClientField3=null&ClientFieldFlag=0&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_linepay_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_linepay_gets_data_about_a_transaction.yml index a27c3b2..be69f94 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_linepay_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_linepay_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranLinepay.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1467366014&JobCd=CAPTURE&Amount=100&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1467366014&AccessID=2352c8be3fd34b2e75ce3fd2b19c1cd2&AccessPass=06561ea4bbb6200b172a58457c88776f http_version: recorded_at: Fri, 01 Jul 2016 09:40:14 GMT @@ -37,7 +37,7 @@ http_interactions: method: post uri: https:///payment/ExecTranLinepay.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1467366014&AccessID=2352c8be3fd34b2e75ce3fd2b19c1cd2&AccessPass=06561ea4bbb6200b172a58457c88776f&RetURL=https%3A%2F%2Fexample.com%2Fpath%2Fto%2Freturn%2Fsuccess&ErrorRcvURL=https%3A%2F%2Fexample.com%2Fpath%2Fto%2Freturn%2Ffailure&ProductName=%8Dw%93%FC%82%B7%82%E9%8F%A4%95i%96%BC&ShopID=&ShopPass= headers: Accept-Encoding: @@ -62,7 +62,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: Start=1&AccessID=2352c8be3fd34b2e75ce3fd2b19c1cd2&Token=5eUT14IYmsZRnCs/S/RYxKrphuf29PTylubWI8BbbUuwBS7yYvxSiC0zeMVH+O4F&StartURL=https:///payment/LinepayStart.idPass http_version: recorded_at: Fri, 01 Jul 2016 09:40:14 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml index 9b778e6..80daeeb 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_parameter_contains_Japanese_characters_should_correctly_handle_Japanese.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1366160239&JobCd=AUTH&Amount=100&ShopID=&ShopPass= headers: Accept-Encoding: @@ -27,7 +27,7 @@ http_interactions: Transfer-Encoding: - chunked body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=68334b323b78058c0ecbbaa996b80ca1&AccessPass=8499e4c83fbd277577f6ce2d95e86868 http_version: recorded_at: Wed, 17 Apr 2013 00:57:19 GMT @@ -35,7 +35,7 @@ http_interactions: method: post uri: https:///payment/ExecTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1366160239&AccessID=68334b323b78058c0ecbbaa996b80ca1&AccessPass=8499e4c83fbd277577f6ce2d95e86868&Method=1&PayTimes=1&CardNo=4111111111111111&Expire=1405&ClientField1=%81%60%81%7C%81%91%81%92%81%CA%81%7C%81a%87%40%82%D9%82%B0%82%D9%82%B0hogehoge&ClientFieldFlag=1&DeviceCategory=0&ShopID=&ShopPass= headers: Accept-Encoding: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_pay_easy_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_pay_easy_gets_data_about_a_transaction.yml index 126fa70..1206105 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_pay_easy_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_pay_easy_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranPayEasy.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1448105474&Amount=100&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=eb18bcc94bd6027929b2cb401b5eff9b&AccessPass=e79f0cbfb6b00343beb85eb8df873277 http_version: recorded_at: Sat, 21 Nov 2015 11:31:15 GMT @@ -37,7 +37,7 @@ http_interactions: method: post uri: https:///payment/ExecTranPayEasy.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1448105474&AccessID=eb18bcc94bd6027929b2cb401b5eff9b&AccessPass=e79f0cbfb6b00343beb85eb8df873277&CustomerName=%83y%83C%91%BE%98Y&CustomerKana=%83y%83C%83%5E%83%8D%83E&TelNo=0300000001&ReceiptsDisp11=RSpec+Helpdesk&ReceiptsDisp12=0300000001&ReceiptsDisp13=00%3A00-00%3A15&ShopID=&ShopPass= headers: Accept-Encoding: @@ -62,7 +62,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1448105474&CustID=WNT05476383&BkCode=58021&ConfNo=3769&EncryptReceiptNo=LB7OigJvPDmbWxAqB8OY&PaymentTerm=20151201235959&TranDate=20151121203100&CheckString=6a7c5cb87d1857e9b9088d65480545e3 http_version: recorded_at: Sat, 21 Nov 2015 11:31:16 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_paypal_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_paypal_gets_data_about_a_transaction.yml new file mode 100644 index 0000000..579ee2a --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_paypal_gets_data_about_a_transaction.yml @@ -0,0 +1,67 @@ +--- +http_interactions: +- request: + method: post + uri: https:///payment/EntryTranPaypal.idPass + body: + encoding: UTF-8 + string: OrderID=1666049036&JobCd=CAPTURE&Amount=100&ShopID=&ShopPass= + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 17 Oct 2022 23:23:57 GMT + Content-Type: + - text/plain;charset=Windows-31J + Transfer-Encoding: + - chunked + Connection: + - close + body: + encoding: UTF-8 + string: OrderID=1666049036&AccessID=0c3ce8ac4d8578942bdc2fb0bbee7657&AccessPass=cbc4fa24f0061c779f4f60a214785c5f + recorded_at: Mon, 17 Oct 2022 23:23:57 GMT +- request: + method: post + uri: https:///payment/ExecTranPaypal.idPass + body: + encoding: UTF-8 + string: OrderID=1666049036&AccessID=0c3ce8ac4d8578942bdc2fb0bbee7657&AccessPass=cbc4fa24f0061c779f4f60a214785c5f&RedirectURL=https%3A%2F%2Fexample.com%2Fpath%2Fto%2Fredirect&ItemName=%8Dw%93%FC%82%B7%82%E9%8F%A4%95i%96%BC&ShopID=&ShopPass= + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Mon, 17 Oct 2022 23:23:57 GMT + Content-Type: + - text/plain;charset=Windows-31J + Transfer-Encoding: + - chunked + Connection: + - close + body: + encoding: UTF-8 + string: OrderID=1666049036 + recorded_at: Mon, 17 Oct 2022 23:23:57 GMT +recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_rakuten_id_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_rakuten_id_gets_data_about_a_transaction.yml index 97680e3..f06a847 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_rakuten_id_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_rakuten_id_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranRakutenId.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=609222947&JobCd=CAPTURE&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,14 +29,14 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=609222947&AccessID=a890530f250c3e3c884ae273060a&AccessPass=55fff26783070a040edd36f73b26ec recorded_at: Tue, 29 Dec 2020 06:22:28 GMT - request: method: post uri: https:///payment/ExecTranRakutenId.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=609222947&AccessID=a890530f250c3e3c884ae273060a&AccessPass=55fff26783070a040edd36f73b26ec&RetURL=https%3A%2F%2Fexample.com%2Fpath%2Fto%2Freturn%2Fsuccess&ErrorRcvURL=https%3A%2F%2Fexample.com%2Fpath%2Fto%2Freturn%2Ffailure&ItemId=000&ItemName=%8Dw%93%FC%82%B7%82%E9%8F%A4%95i%96%BC&ShopID=&ShopPass= headers: Accept-Encoding: @@ -61,7 +61,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=a890530f250c3e3c884ae273060a&Token=givwPbv44WyJuP66kQHXNHJ99gPQ6Yh/I5NrE0wMHxWwBS7yYvxSiC0zeMVH+O4F&StartURL=https:///payment/RakutenIdStart.idPass&StartLimitDate=202022952428 recorded_at: Tue, 29 Dec 2020 06:22:28 GMT recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_suica_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_suica_gets_data_about_a_transaction.yml index f60531c..4967b95 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_suica_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_suica_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranSuica.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=662969936&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,14 +29,14 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=288a3a5032a25e723dad495d3b28a&AccessPass=d2dea7b2b94eab5ab3bddcfbd9cf58bc recorded_at: Mon, 12 Sep 2022 08:05:37 GMT - request: method: post uri: https:///payment/ExecTranSuica.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=662969936&AccessID=288a3a5032a25e723dad495d3b28a&AccessPass=d2dea7b2b94eab5ab3bddcfbd9cf58bc&ItemName=%8Dw%93%FC%82%B7%82%E9%8F%A4%95i%96%BC&MailAddress=test%40example.com&ClientField=client_field&ClientFieldFlag=&ShopID=&ShopPass= headers: Accept-Encoding: @@ -61,7 +61,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=662969936&SuicaOrderNo=662969936-22092052836&ReceiptNo=SCA93925&PaymentTerm=2022092270637&TranDate=202209270539&CheckString=dfca947cffe2aa8927f3fcbb403d02&ClientField=client_field&ClientField2=&ClientField3= recorded_at: Mon, 12 Sep 2022 08:05:39 GMT recorded_with: VCR 6.0.0 diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_virtualaccount_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_virtualaccount_gets_data_about_a_transaction.yml index 35b1a41..b5032c4 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_virtualaccount_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_virtualaccount_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranVirtualaccount.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=66262552&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,14 +29,14 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=66262552&AccessID=dda76d2bb678f82ad3e4a7ded59d5b0&AccessPass=fdeccc446bb3320f48259062055ad926 recorded_at: Thu, 08 Sep 2022 07:19:13 GMT - request: method: post uri: https:///payment/ExecTranVirtualaccount.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=66262552&AccessID=dda76d2bb678f82ad3e4a7ded59d5b0&AccessPass=fdeccc446bb3320f48259062055ad926&TradeDays=4&ShopID=&ShopPass= headers: Accept-Encoding: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_with_3DS2_0_returns_3DS2_0_challenge_flow_response.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_with_3DS2_0_returns_3DS2_0_challenge_flow_response.yml new file mode 100644 index 0000000..51f9fe0 --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_exec_tran_with_3DS2_0_returns_3DS2_0_challenge_flow_response.yml @@ -0,0 +1,33 @@ +--- +http_interactions: +- request: + method: post + uri: https:///payment/ExecTran.idPass + body: + encoding: UTF-8 + string: AccessID=&AccessPass=&OrderID=&Method=1&PayTimes=&MemberID=&CardSeq=0&TdsType=2&Tds2Type=2&CallBackUrl=https%3A%2F%2Fexample.com%2Fcallback&Tds2RetUrl=https%3A%2F%2Fexample.com%2F3ds%2Freturn + headers: + Accept: + - "*/*" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/plain; charset=shift_jis + Date: + - Thu, 24 Jul 2025 23:15:18 GMT + Server: + - Apache + body: + encoding: UTF-8 + string: OrderID=&Forward=&Method=1&PayTimes=&Approve=&TranID=&TranDate=&CheckString=&Tds2TransResult=C&Tds2TransResultReason=01&Tds2ChallengeUrl=https:///payment/Tds2Challenge?tds2TransID=&Tds2TransID= + recorded_at: Thu, 24 Jul 2025 23:15:18 GMT +recorded_with: VCR 6.3.1 \ No newline at end of file diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_refund_tran_brandtoken_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_refund_tran_brandtoken_gets_data_about_a_transaction.yml index d1a5b50..ad9dbc3 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_refund_tran_brandtoken_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_refund_tran_brandtoken_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50290462&JobCd=CAPTURE&Amount=000&ShopID=&ShopPass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f http_version: recorded_at: Tue, 08 Aug 2017 11:07:43 GMT @@ -39,7 +39,7 @@ http_interactions: method: post uri: https:///payment/ExecTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50278987&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&TokenType=APay&Token=base64encodedtoken&ShopID=&ShopPass= headers: Accept-Encoding: @@ -66,7 +66,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: Status=CAPTURE&OrderID=597ae8c3620b23a3c0004e&Forward=2a99663&Approve=5487394&TranID=707286347726&TranDate=207072863453&ClientField=&ClientField2=&ClientField3= http_version: recorded_at: Tue, 08 Aug 2017 07:56:28 GMT @@ -74,7 +74,7 @@ http_interactions: method: post uri: https:///payment/RefundTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&OrderID=5029055&Amount=000&ShopID=&ShopPass= headers: Accept-Encoding: @@ -101,7 +101,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=139f8ec33a07c55f406937c52ce4473d&AccessPass=2689b204d2c17192fa35f9269fa7e744&Status=RETURN&Forward=2a99663&Approve=5537883&TranID=1707311620111111111111771220&TranDate=20170731162256 http_version: recorded_at: Tue, 08 Aug 2017 11:09:12 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_sales_tran_brandtoken_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_sales_tran_brandtoken_gets_data_about_a_transaction.yml index 18dd5b9..01a4de6 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_sales_tran_brandtoken_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_sales_tran_brandtoken_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50289826&JobCd=AUTH&Amount=000&ShopID=&ShopPass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f http_version: recorded_at: Tue, 08 Aug 2017 10:57:07 GMT @@ -39,7 +39,7 @@ http_interactions: method: post uri: https:///payment/ExecTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50278987&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&TokenType=APay&Token=base64encodedtoken&ShopID=&ShopPass= headers: Accept-Encoding: @@ -66,7 +66,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: Status=AUTH&OrderID=597ae8c3620b23a3c0004e&Forward=2a99663&Approve=5487394&TranID=707286347726&TranDate=207072863453&ClientField=client_field&ClientField2=&ClientField3= http_version: recorded_at: Tue, 08 Aug 2017 07:56:28 GMT @@ -74,7 +74,7 @@ http_interactions: method: post uri: https:///payment/TradedBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=50289924&OrderID=50289924&ShopID=&ShopPass=&SiteID=&SitePass= headers: Accept-Encoding: @@ -101,7 +101,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: TokenSeq=0&CardNoToken=*************&Forward=2a99663 http_version: recorded_at: Tue, 08 Aug 2017 10:58:45 GMT @@ -109,7 +109,7 @@ http_interactions: method: post uri: https:///payment/SalesTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&OrderID=50289957&Amount=000&ShopID=&ShopPass= headers: Accept-Encoding: @@ -136,7 +136,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=139f8ec33a07c55f406937c52ce4473d&AccessPass=2689b204d2c17192fa35f9269fa7e744&Status=SALES&Forward=2a99663&Approve=5537883&TranID=1707311620111111111111771220&TranDate=20170731162256 http_version: recorded_at: Tue, 08 Aug 2017 10:59:18 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_gets_data_about_order.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_gets_data_about_order.yml index 6056477..b7b4c3b 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_gets_data_about_order.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_gets_data_about_order.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SearchTrade.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106772&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_got_error_if_missing_options.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_got_error_if_missing_options.yml index 01e9583..ca1cff6 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_got_error_if_missing_options.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_got_error_if_missing_options.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SearchTradeMulti.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=null&PayType=null&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_gets_data_about_order.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_gets_data_about_order.yml index 018b495..f4024ff 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_gets_data_about_order.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_gets_data_about_order.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SearchTradeMulti.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1362106772&PayType=0&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_got_error_if_missing_options.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_got_error_if_missing_options.yml index 01e9583..ca1cff6 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_got_error_if_missing_options.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_search_trade_multi_got_error_if_missing_options.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SearchTradeMulti.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=null&PayType=null&ShopID=&ShopPass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_secure_tran_2_completes_payment_after_3DS2_0_challenge_verification.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_secure_tran_2_completes_payment_after_3DS2_0_challenge_verification.yml new file mode 100644 index 0000000..3191fe4 --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_secure_tran_2_completes_payment_after_3DS2_0_challenge_verification.yml @@ -0,0 +1,33 @@ +--- +http_interactions: +- request: + method: post + uri: https:///payment/SecureTran2.idPass + body: + encoding: UTF-8 + string: AccessID=&AccessPass= + headers: + Accept: + - "*/*" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/plain; charset=shift_jis + Date: + - Thu, 24 Jul 2025 23:15:18 GMT + Server: + - Apache + body: + encoding: UTF-8 + string: OrderID=&Forward=&Method=1&PayTimes=&Approve=&TranID=&TranDate=&CheckString= + recorded_at: Thu, 24 Jul 2025 23:15:18 GMT +recorded_with: VCR 6.3.1 \ No newline at end of file diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_secure_tran_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_secure_tran_gets_data_about_a_transaction.yml index 5b8592e..63b3f2b 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_secure_tran_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_secure_tran_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SecureTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: PaRes=eJydVluTokoSfvdXdPR5NGa4ycUJ2o0CSgRBuQu%2BIXfkooKA%2FvqFdk5Px4mN2I0lAq36yPwyKzMr%0D%0Aq9h%2FDWXxkW3Jqurj3fsJ%2Fr%2BFlVBHWZV8vFuW%2BsfzPtb0%2FpV6BdFX28V%2FX7vasld6iSDCj4H6L%0D%0AVqwaNY2fRG9Z%2BPGu%2BUZ0xShsQVIYTTI0weA0wzAoSdMoNf6iFM0s3lesBoyo%2BdRwyYPMHBQnFnlz%0D%0Aj4cLu3RREcAAAAdBX%2F7thpd%2B4mzyN%2FT0egtSP2qXbF%2BcOWk3WqB4cSCZJHfU7aMbpKw%2BgRHm0v0%0D%0A9%2BcXzCJ%2F9LX7NGrGhQxZuFJz8FAt8FQFOKiC9FAF0E%2FvXpA%2BWGSSYEO%2FjVY4imMogWJvKPYLx38R%0D%0ADIt84uxlogNlfR%2B5MRRFWeQ7wo4hu40RfqyI5bicrxkbDZcxwKPEqPAZpE%2Fzl38aoV%2BewgCGwkm%0D%0AlLXcFdtm5TenMPQXTvzCR6c%2BcXZMYXtvVh6L%2FB6xgd9KzA9uiRwAPKgzmQqBC8nnGxnyJsFGQr%0D%0AdAzc9P%2BpBYqkvmVtWq7wl8wfgEUmV5DP5K5YM0uq0dgtehuLrGo%2B3tO2vfxCkL7vf%2FbEz%2FqWIPi4%0D%0AEARdIqNA2GTJX%2B8vrSiUqrhesbxfVUW%2BEX29Nsx7WrUpnX49mXwPFaxsSKIQbkf4y0PwJsUf2Y%0D%0AEJTAyHfkmv%2FC9s%2FHbw%2Fo8m9bGJyIjiaMpe9GYb0sf7X%2F%2BlkoUsiZr2%2FzH6t8EXg%2BMX92gVvt%0D%0AbJR7a7CCsjTIKAt3BV2ioliPqfsuySJfjo7j7%2BH9isRLEBxvC54KsbVxKAVX2gWDVmba77B0ZPg%0D%0AqFAX5%2FhDPKdVRtfH86at5YV69KHY63NDCzAa673FTs3CiWFMenusCYP5tgoF3Lg5nq%2BszybHFV%0D%0ABrwnHXOp5KbLBdiJaljrdHzBqyruRaLYglIx2fRoP0xdoOrsCedegr2CUjSmx8CNeuJ2w5EC%0D%0ANIohS4pFLJipHevbaLeGyj6qQUIldiGGFKz2Z4pcYvOUx%2FalnaCDJ8pLl5SMA%2BBdcAwc5LPb87%0D%0A%2B8a4hHaiXJAMie56TcdzQPrlve2XEk%2B2fR%2Fuj552ID2676C6weRdDheXqzF74KZgpzmtOO6vqdt%0D%0A4cfSVyjG%2B2MU7RrAt8%2BTj4xX4b8Fmt9HjlQWXRJeC3%2FqvER%2Fd2iwea37sJaokQUXgeTCYCeil%0D%0AcXtKMpBP3XETgtIxfBWgY6ldRVM6EYIOOU63gSqJqao3Pa97gqPrIuzlrSAfaaChQgwe9roGxtf%0D%0AX0Jx3XoWCaSCef6XnTw9cM7yBfVTHo5%2BSTYCtxSM9FzYhyGwiOMh39Qk5l5IM%2Bhu0OD6pzoOHNX%0D%0AeE4NRf2uGmoPX5YVAVw4y%2BSs0OX6EyGjYftlRepIPDhJ6np7p6z8OA8JHF9P%2FIc9F5stJNxDbh%0D%0AZKPi2T%2BQaSjaiY7CfpMGO9WC%2FW5qzdb0QvQwYfmEQXL2BeY8lz2hooLza3mpypsFGKAA9lyyc8Zg%0D%0AWhy2S33XSE8HOAhPsHvhgcUVYRqU62zmW7BWee8VtSNLbSVJeg0x8O49LLIJVjcjxvnGW5kUoK7%0D%0ATsn6xNoYZyWHjsqpL7BVXUbW8%2BM77Ewkn79OxawfwXYEUcinpMDYocdXalPknHT%2FCPDYMwwWEjc%0D%0ATOjBJLAF9VgWOi8xkoWUqWHqx6VCUm0aZ8OBEp%2FIkVERZB6CqLaZtVIk6iZ3BaInGzfPuOBi%2BYSh%0D%0AztC%2B2z0CeHHSrvn8HRalvpiTcowJ84mkhLQul3Eq4xQhogvfbkm%2F65vKZb0PRoHd2Vgy%2BmQh7g%0D%0A26zjZjVmh0N6JXVbg7KS4kFrQ8Ms3ng3Q55LVImDJUrch2%2BUfHhGIU7ONzYB%2B7tqREQ9sIglQZ%0D%0AMddQZ0eebeW50gjpNQ9OttbFKbL2RGxP5%2FRTbIQlXUeZysf93lJbK7jECDmQTNPGSheq6K2ZeU%0D%0Aomod%2BIl0YuYzjSzJXRccGCVlsEPFDWpzgno%2BOFyeyARmdY0gbrJ2C%2FZNQxnB7aZcb%2BOJyAEg5tGT%0D%0AI3%2BXUgh7nR%2B30jNwJM96SgB77TQE7jjOOawsZf98UBaNtonBu7cj648Fq9zHsujCCrjchzLxnON%0D%0AQuU%2Bt0oJPphxnHWrXuuF0EAy2t%2FhuZmgbVwr5x6JuFzEE%2BFuTFVKArgkHBWaacH0Hj0t2U%2B74l%0D%0ANTRRTg3UDVMAuxmXnK%2FpOROXPTrVy3j87HmgQ6BTEmnjulxA06JSkEcLRCfMXQY8u3JzJxOQwv6%0D%0Aqt%2BFhcf0YjGMDYeYzam9SxNNN3%2B0begv5NvScweD7u%2BtIVA0KRue5Q7Zz9HsXVrWTamVl2%2BVirB%0D%0AIrdw3mfJSV%2Bml5QUa4uckZmXdShanL3KnJcsFeQWsQW7bWBBXFzcMrSgh3FyFxm7qUYxMFuuBzJ%0D%0AUCYdLY%2FnGdgtr3dPoNBuIRszyTQKfrho5wcBs9ec7eL%2FD4X5FyqzPBZSeG6jGLtuD%2FOH%2BqNS%2BgH%0D%0AoT%2FJhwuogfIC0hLLBluezVOkXTxlliYRYdaxkB46rteNHR8c833gxuUBY7bKxUs7mT4ftXP%2B4De4%0D%0AHBOwQKL%2BFpE8W0PrX3f%2FbuF%2FLq68hXr%2F9zCnxeQT%2FvzdOt6ft9%2Bt%2FDNsF7%0D%0A&MD=a6ae35ca097e266be8024f000034d&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=Darren-test-2020300228&Forward=2a99662&Method=&PayTimes=&Approve= 004536&TranID=20300038075&TranDate=20203002444&CheckString=54686df6bad0b4ca3366024c7806ff66 recorded_at: Mon, 01 Mar 2021 01:24:44 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_tds2_auth_executes_3DS2_0_authentication.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_tds2_auth_executes_3DS2_0_authentication.yml new file mode 100644 index 0000000..06b3cb1 --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_tds2_auth_executes_3DS2_0_authentication.yml @@ -0,0 +1,33 @@ +--- +http_interactions: +- request: + method: post + uri: https:///payment/Tds2Auth.idPass + body: + encoding: UTF-8 + string: AccessID=&AccessPass=&Tds2Param=&ShopID=&ShopPass= + headers: + Accept: + - "*/*" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/plain; charset=shift_jis + Date: + - Thu, 24 Jul 2025 23:15:18 GMT + Server: + - Apache + body: + encoding: UTF-8 + string: OrderID=&Forward=&Method=1&PayTimes=&Approve=&TranID=&TranDate=&CheckString=&Tds2TransResult=Y&Tds2TransResultReason=&Tds2ChallengeUrl=https:///payment/Tds2Challenge?tds2TransID= + recorded_at: Thu, 24 Jul 2025 23:15:18 GMT +recorded_with: VCR 6.3.1 \ No newline at end of file diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_tds2_result_gets_3DS2_0_authentication_result.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_tds2_result_gets_3DS2_0_authentication_result.yml new file mode 100644 index 0000000..7fb364e --- /dev/null +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_tds2_result_gets_3DS2_0_authentication_result.yml @@ -0,0 +1,33 @@ +--- +http_interactions: +- request: + method: post + uri: https:///payment/Tds2Result.idPass + body: + encoding: UTF-8 + string: AccessID=&AccessPass=&ShopID=&ShopPass= + headers: + Accept: + - "*/*" + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - text/plain; charset=shift_jis + Date: + - Thu, 24 Jul 2025 23:15:18 GMT + Server: + - Apache + body: + encoding: UTF-8 + string: OrderID=&Forward=&Method=1&PayTimes=&Approve=&TranID=&TranDate=&CheckString=&Tds2TransResult=Y&Tds2TransResultReason= + recorded_at: Thu, 24 Jul 2025 23:15:18 GMT +recorded_with: VCR 6.3.1 \ No newline at end of file diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_void_tran_brandtoken_gets_data_about_order.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_void_tran_brandtoken_gets_data_about_order.yml index bc8bb42..cf7b04e 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_void_tran_brandtoken_gets_data_about_order.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAPI/_void_tran_brandtoken_gets_data_about_order.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50289293&JobCd=AUTH&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f http_version: recorded_at: Tue, 08 Aug 2017 10:48:14 GMT @@ -39,7 +39,7 @@ http_interactions: method: post uri: https:///payment/ExecTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50278987&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&TokenType=APay&Token=base64encodedtoken&ShopID=&ShopPass= headers: Accept-Encoding: @@ -66,7 +66,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: Status=AUTH&OrderID=597ae8c3620b23a3c0004e&Forward=2a99663&Approve=5487394&TranID=707286347726&TranDate=207072863453&ClientField=client_field&ClientField2=&ClientField3= http_version: recorded_at: Tue, 08 Aug 2017 07:56:28 GMT @@ -74,7 +74,7 @@ http_interactions: method: post uri: https:///payment/VoidTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50289054&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&ShopID=&ShopPass= headers: Accept-Encoding: @@ -101,7 +101,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=21170701482c86c3b88ff72b83bfd363&AccessPass=51f36feba120de1e6e29532e5a3a5e3e&Status=CAPTURE&Forward=2a99663&Approve=5538477&TranID=1707311633111111111111771224&TranDate=20170731163343 http_version: recorded_at: Tue, 08 Aug 2017 10:44:15 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_exec_tran_brandtoken_got_data.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_exec_tran_brandtoken_got_data.yml index 1a956e7..87b772a 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_exec_tran_brandtoken_got_data.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_exec_tran_brandtoken_got_data.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50277398&JobCd=AUTH&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f http_version: recorded_at: Tue, 08 Aug 2017 07:29:59 GMT @@ -39,7 +39,7 @@ http_interactions: method: post uri: https:///payment/ExecTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50277572&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&TokenType=APay&Token=base64encodedtoken&MemberID=50277572&ShopID=&ShopPass=&SiteID=&SitePass= headers: Accept-Encoding: @@ -66,7 +66,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: Status=AUTH&OrderID=50277572&Forward=2a99663&Approve=5487394&TranID=707286347726&TranDate=207072863453&ClientField=&ClientField2=&ClientField3= http_version: recorded_at: Tue, 08 Aug 2017 07:32:53 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_register_recurring_credit_got_data.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_register_recurring_credit_got_data.yml index 80ab7e7..348d51a 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_register_recurring_credit_got_data.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_register_recurring_credit_got_data.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/RegisterRecurringCredit.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: RecurringID=53596492&Amount=00&ChargeDay=3&RegistType=&MemberID=smama_development_user_&SiteID=&SitePass=&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: ShopID=&RecurringID=53596492&Amount=00&Tax=0&ChargeDay=3&ChargeMonth=0|02|03|04|05|06|07|08|09|0||2&ChargeStartDate=2080904&ChargeStopDate=&NextChargeDate=2080930&Method=RECURRING_CREDIT&CardNo=&Expire=&SiteID=&MemberID=smama_development_user_ http_version: recorded_at: Mon, 03 Sep 2018 08:55:22 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_brandtoken_got_data.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_brandtoken_got_data.yml index b7b7fa1..5e28944 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_brandtoken_got_data.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_brandtoken_got_data.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50277398&JobCd=AUTH&Amount=00&ShopID=&ShopPass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f http_version: recorded_at: Tue, 08 Aug 2017 07:29:59 GMT @@ -39,7 +39,7 @@ http_interactions: method: post uri: https:///payment/ExecTranBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50277572&AccessID=da0687345d63ce206f4cd05bc5322&AccessPass=45a2e63323c3795d26e22338eaa6b7f&TokenType=APay&Token=base64encodedtoken&MemberID=50277572&ShopID=&ShopPass=&SiteID=&SitePass= headers: Accept-Encoding: @@ -66,7 +66,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: Status=AUTH&OrderID=50277572&Forward=2a99663&Approve=5487394&TranID=707286347726&TranDate=207072863453&ClientField=&ClientField2=&ClientField3= http_version: recorded_at: Tue, 08 Aug 2017 07:32:53 GMT @@ -74,7 +74,7 @@ http_interactions: method: post uri: https:///payment/TradedBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50277838&MemberID=50277838&ShopID=&ShopPass=&SiteID=&SitePass= headers: Accept-Encoding: @@ -101,7 +101,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: TokenSeq=0&CardNoToken=*************111&Forward=2a99663 http_version: recorded_at: Tue, 08 Aug 2017 07:37:18 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_data.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_data.yml index d007085..a1e0138 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_data.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_data.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/EntryTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1371958258&JobCd=AUTH&Amount=100&ShopID=&ShopPass= headers: Accept-Encoding: @@ -27,7 +27,7 @@ http_interactions: Transfer-Encoding: - chunked body: - encoding: UTF-8 + encoding: Windows-31J string: AccessID=1da06187345d613ce206f4cd05bc5322&AccessPass=45a21e63323c3795d26e22338eaa6b7f http_version: recorded_at: Sun, 23 Jun 2013 03:30:59 GMT @@ -35,7 +35,7 @@ http_interactions: method: post uri: https:///payment/ExecTran.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1371958258&AccessID=1da06187345d613ce206f4cd05bc5322&AccessPass=45a21e63323c3795d26e22338eaa6b7f&Method=1&PayTimes=1&CardNo=4111111111111111&Expire=1405&ClientFieldFlag=0&DeviceCategory=0&ShopID=&ShopPass= headers: Accept-Encoding: @@ -58,7 +58,7 @@ http_interactions: Transfer-Encoding: - chunked body: - encoding: UTF-8 + encoding: Windows-31J string: ACS=0&OrderID=1371958258&Forward=2a99662&Method=1&PayTimes=&Approve=7214787&TranID=1306231226111111111111199359&TranDate=20130623123059&CheckString=74f54b788565f291e65f67c606f90ca2 http_version: recorded_at: Sun, 23 Jun 2013 03:30:59 GMT @@ -66,7 +66,7 @@ http_interactions: method: post uri: https:///payment/SaveMember.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1371958259&MemberName=John+Smith&SiteID=&SitePass= headers: Accept-Encoding: @@ -89,7 +89,7 @@ http_interactions: Transfer-Encoding: - chunked body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1371958259 http_version: recorded_at: Sun, 23 Jun 2013 03:30:59 GMT @@ -97,7 +97,7 @@ http_interactions: method: post uri: https:///payment/TradedCard.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=1371958258&MemberID=1371958259&ShopID=&ShopPass=&SiteID=&SitePass= headers: Accept-Encoding: @@ -120,7 +120,7 @@ http_interactions: Transfer-Encoding: - chunked body: - encoding: UTF-8 + encoding: Windows-31J string: CardSeq=0&CardNo=************1111&Forward=2a99662 http_version: recorded_at: Sun, 23 Jun 2013 03:31:00 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_error_if_missing_options.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_error_if_missing_options.yml index 75446d7..8512ee1 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_error_if_missing_options.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_trade_card_got_error_if_missing_options.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/TradedCard.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=null&MemberID=null&SeqMode=0&DefaultFlag=0&ShopID=&ShopPass=&SiteID=&SitePass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_unregister_recurring_success_unregister.yml b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_unregister_recurring_success_unregister.yml index 0c607eb..b1e8aeb 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_unregister_recurring_success_unregister.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_ShopAndSiteAPI/_unregister_recurring_success_unregister.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/RegisterRecurringCredit.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: RecurringID=536039393&Amount=00&ChargeDay=3&RegistType=&MemberID=smama_development_user_&SiteID=&SitePass=&ShopID=&ShopPass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: ShopID=&RecurringID=536039393&Amount=00&Tax=0&ChargeDay=3&ChargeMonth=0|02|03|04|05|06|07|08|09|0||2&ChargeStartDate=2080905&ChargeStopDate=&NextChargeDate=2080930&Method=RECURRING_CREDIT&CardNo=&Expire=&SiteID=&MemberID=smama_development_user_ http_version: recorded_at: Tue, 04 Sep 2018 05:36:34 GMT @@ -37,7 +37,7 @@ http_interactions: method: post uri: https:///payment/UnregisterRecurring.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: RecurringID=536039393&SiteID=&SitePass=&ShopID=&ShopPass= headers: Accept-Encoding: @@ -62,7 +62,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: ShopID=&RecurringID=536039393&Amount=00&Tax=0&ChargeDay=3&ChargeMonth=0|02|03|04|05|06|07|08|09|0||2&ChargeStartDate=2080905&ChargeStopDate=&NextChargeDate=&Method=RECURRING_CREDIT&CardNo=&Expire=&SiteID=&MemberID=smama_development_user_&PrintStr= http_version: recorded_at: Tue, 04 Sep 2018 05:36:34 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_brandtoken_gets_data_about_a_brandtoken.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_brandtoken_gets_data_about_a_brandtoken.yml index 27f8a78..97183ff 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_brandtoken_gets_data_about_a_brandtoken.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_brandtoken_gets_data_about_a_brandtoken.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/TradedBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=5029295&MemberID=5029295&ShopID=&ShopPass=&SiteID=&SitePass= headers: Accept-Encoding: @@ -31,7 +31,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: TokenSeq=0&CardNoToken=*************&Forward=2a99663 http_version: recorded_at: Tue, 08 Aug 2017 11:21:35 GMT @@ -39,7 +39,7 @@ http_interactions: method: post uri: https:///payment/DeleteBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=5029329&SeqMode=0&TokenSeq=0&SiteID=&SitePass= headers: Accept-Encoding: @@ -66,7 +66,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: TokenSeq=0 http_version: recorded_at: Tue, 08 Aug 2017 11:22:09 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_card_gets_data_about_a_card.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_card_gets_data_about_a_card.yml index 4858804..bdb014c 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_card_gets_data_about_a_card.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_card_gets_data_about_a_card.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/DeleteCard.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106780&CardSeq=0&SiteID=&SitePass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_member_gets_data_about_a_member.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_member_gets_data_about_a_member.yml index fcf0798..e8776ca 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_member_gets_data_about_a_member.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_delete_member_gets_data_about_a_member.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SaveMember.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106781&MemberName=John+Smith&SiteID=&SitePass= headers: Accept: @@ -33,7 +33,7 @@ http_interactions: method: post uri: https:///payment/DeleteMember.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106781&SiteID=&SitePass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_doesn_t_require_card_info_if_token_is_present.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_doesn_t_require_card_info_if_token_is_present.yml index 39457bb..f3b2708 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_doesn_t_require_card_info_if_token_is_present.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_doesn_t_require_card_info_if_token_is_present.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SaveCard.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=&Token=&SiteID=&SitePass= headers: Accept-Encoding: @@ -29,7 +29,7 @@ http_interactions: Connection: - close body: - encoding: UTF-8 + encoding: Windows-31J string: CardSeq=0&CardNo=*************111&Forward=2a99662 http_version: recorded_at: Fri, 03 Feb 2017 09:42:25 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_gets_data_about_a_card.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_gets_data_about_a_card.yml index dcf8a3b..caf58be 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_gets_data_about_a_card.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_card_gets_data_about_a_card.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SaveCard.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106780&CardNo=4111111111111111&Expire=1405&SiteID=&SitePass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_member_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_member_gets_data_about_a_transaction.yml index 98557bb..e31bd17 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_member_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_save_member_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SaveMember.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106780&MemberName=John+Smith&SiteID=&SitePass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_brandtoken_gets_data_about_a_brandtoken.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_brandtoken_gets_data_about_a_brandtoken.yml index 0306998..19234f3 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_brandtoken_gets_data_about_a_brandtoken.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_brandtoken_gets_data_about_a_brandtoken.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/TradedBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: OrderID=50290974&MemberID=50290974&ShopID=&ShopPass=&SiteID=&SitePass= headers: Accept-Encoding: @@ -32,7 +32,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: TokenSeq=0&CardNoToken=*************&Forward=2a99663 http_version: recorded_at: Tue, 08 Aug 2017 11:16:15 GMT @@ -40,7 +40,7 @@ http_interactions: method: post uri: https:///payment/SearchBrandtoken.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=50297&SeqMode=0&SiteID=&SitePass= headers: Accept-Encoding: @@ -67,7 +67,7 @@ http_interactions: Content-Language: - ja-JP body: - encoding: UTF-8 + encoding: Windows-31J string: TokenSeq=0&DefaultFlag=0&CardName=&CardNoToken=*************111&Expire=2212&HolderName=&DeleteFlag=0 http_version: recorded_at: Tue, 08 Aug 2017 11:18:38 GMT diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_detail_by_member_id_gets_data_about_card_detail.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_detail_by_member_id_gets_data_about_card_detail.yml index a0bacd1..33bb197 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_detail_by_member_id_gets_data_about_card_detail.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_detail_by_member_id_gets_data_about_card_detail.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https://pt0.mul-pay.jp/payment/SearchCardDetail.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=50292464&SeqMode=0&ShopID=&ShopPass= headers: Accept-Encoding: diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_gets_data_about_a_card.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_gets_data_about_a_card.yml index 5c6432e..3c8b991 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_gets_data_about_a_card.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_card_gets_data_about_a_card.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SaveCard.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106780&CardNo=4111111111111111&Expire=1405&SiteID=&SitePass= headers: Accept: @@ -33,7 +33,7 @@ http_interactions: method: post uri: https:///payment/SearchCard.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106780&CardSeq=0&SeqMode=0&SiteID=&SitePass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_member_gets_data_about_a_member.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_member_gets_data_about_a_member.yml index 5eaad5f..f8db485 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_member_gets_data_about_a_member.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_search_member_gets_data_about_a_member.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/SaveMember.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106992&MemberName=John+Smith&SiteID=&SitePass= headers: Accept: @@ -33,7 +33,7 @@ http_interactions: method: post uri: https:///payment/SearchMember.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106992&SiteID=&SitePass= headers: Accept: diff --git a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_update_member_gets_data_about_a_transaction.yml b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_update_member_gets_data_about_a_transaction.yml index 899d018..9859d35 100644 --- a/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_update_member_gets_data_about_a_transaction.yml +++ b/fixtures/vcr_cassettes/GMO_Payment_SiteAPI/_update_member_gets_data_about_a_transaction.yml @@ -4,7 +4,7 @@ http_interactions: method: post uri: https:///payment/UpdateMember.idPass body: - encoding: UTF-8 + encoding: Windows-31J string: MemberID=1362106780&MemberName=John+Smith2&SiteID=&SitePass= headers: Accept: diff --git a/gmo.gemspec b/gmo.gemspec index fc3a2cd..bfc75dd 100644 --- a/gmo.gemspec +++ b/gmo.gemspec @@ -23,8 +23,10 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency "rack" gem.add_runtime_dependency "multi_json" + gem.add_runtime_dependency "nkf" gem.add_development_dependency "rspec", "~> 3" gem.add_development_dependency "rake" gem.add_development_dependency "vcr" gem.add_development_dependency "webmock" + gem.add_development_dependency "ostruct" end diff --git a/lib/gmo.rb b/lib/gmo.rb index a41dd3d..02f814e 100644 --- a/lib/gmo.rb +++ b/lib/gmo.rb @@ -38,11 +38,25 @@ def api(path, args = {}, verb = "post", options = {}, &error_checking_block) raise GMO::Payment::ServerError.new(result.body, error_detail) end # Transform the body to Hash - # "ACS=1&ACSUrl=url" => { "ACS" => "1", ACSUrl => "url" } - key_values = result.body.to_s.split('&').map { |str| str.split('=', 2) }.flatten - response = Hash[*key_values] + if /\.json\Z/ =~ path + # Parse the body as JSON + parsed_result = ::JSON.parse(result.body) + response = parsed_result.is_a?(Array) ? parsed_result[0] : parsed_result + else + # Parse the body as Query string + # "ACS=1&ACSUrl=url" => { "ACS" => "1", ACSUrl => "url" } + key_values = result.body.to_s.split('&').map { |str| str.split('=', 2) }.flatten + response = Hash[*key_values] + end + # Transform the redirect_url + # "ACS=2&RedirectUrl=https://manage.tds2gw.gmopg.jp/api/v2/brw/callback?transId=6e48e31f-2940-48e1-a702-ebba2f3373ee&t=dccc8a7ed85372c9accff576bff59b3a" + # => { "ACS" => "2", RedirectUrl => "https://manage.tds2gw.gmopg.jp/api/v2/brw/callback?transId=6e48e31f-2940-48e1-a702- ebba2f3373ee&t=dccc8a7ed85372c9accff576bff59b3a" } + if response['RedirectUrl'] && response['RedirectUrl'] != '' && response['t'] && response['t'] != '' && response.keys.index('RedirectUrl') + 1 == response.keys.index('t') + response['RedirectUrl'] = response['RedirectUrl'] + '&t=' + response['t'] + response.delete('t') + end # converting to UTF-8 - body = response = Hash[response.map { |k,v| [k, NKF.nkf('-w',v)] }] + body = response = Hash[response.map { |k,v| [k, NKF.nkf('-S -w',v)] }] # Check for errors if provided a error_checking_block yield(body) if error_checking_block # Return result @@ -63,7 +77,7 @@ def get_request(name, args = {}, options = {}) # gmo.post_request("EntryTran.idPass", {:foo => "bar"}) # POST /EntryTran.idPass with params foo=bar def post_request(name, args = {}, options = {}) - args = associate_options_to_gmo_params args + args = associate_options_to_gmo_params(name, args) api_call(name, args, "post", options) end alias :post! :post_request @@ -75,8 +89,9 @@ def assert_required_options(required, options) raise ArgumentError, "Required #{missing.join(', ')} were not provided." unless missing.empty? end - def associate_options_to_gmo_params(options) - Hash[options.map { |k, v| [GMO::Const::INPUT_PARAMS[k], v] }] + def associate_options_to_gmo_params(api_method_name, options) + params = GMO::Const.input_params(api_method_name) + Hash[options.map { |k, v| [params[k], v] }] end def api_call(*args) diff --git a/lib/gmo/const.rb b/lib/gmo/const.rb index 305575e..99cfbac 100644 --- a/lib/gmo/const.rb +++ b/lib/gmo/const.rb @@ -20,7 +20,7 @@ module Const order_id: '3' } - INPUT_PARAMS = { + BASE_INPUT_PARAMS = { :access_id => "AccessID", :access_pass => "AccessPass", :account_name => "Account_Name", @@ -33,11 +33,17 @@ module Const :address_4 => "Address4", :address_5 => "Address5", :address_6 => "Address6", + :auth_code => "Auth_Code", + :auth_code_2 => "Auth_Code2", + :auth_code_3 => "Auth_Code3", :amount => "Amount", + :app_mode => "AppMode", :bank_code => "Bank_Code", :bank_id => "Bank_ID", :branch_code => "Branch_Code", :branch_code_jp => "Branch_Code_Jpbank", + :call_back_url => "Call_Back_Url", + :callback_type => "CallbackType", :cancel_amount => "CancelAmount", :cancel_tax => "CancelTax", :card_name => "CardName", @@ -52,6 +58,7 @@ module Const :client_field_2 => "ClientField2", :client_field_3 => "ClientField3", :client_field_flg => "ClientFieldFlag", + :client_name => "Client_Name", :commodity => "Commodity", :confirm_base_date => "ConfirmBaseDate", :continuance_month => "ContinuanceMonth", @@ -87,6 +94,10 @@ module Const :locale => "Locale", :md => "MD", :mail_address => "MailAddress", + :mail_template_free_1 => "Mail_Template_Free1", + :mail_template_free_2 => "Mail_Template_Free2", + :mail_template_free_3 => "Mail_Template_Free3", + :mail_template_number => "Mail_Template_Number", :member_id => "MemberID", :member_name => "MemberName", :member_no => "MemberNo", @@ -123,12 +134,18 @@ module Const :register_disp_6 => "RegisterDisp6", :register_disp_7 => "RegisterDisp7", :register_disp_8 => "RegisterDisp8", + :remit_method_amazongift => "Remit_Method_Amazongift", + :remit_method_aupay => "Remit_Method_Aupay", + :remit_method_bank => "Remit_Method_Bank", + :remit_method_sevenatm => "Remit_Method_Sevenatm", :reserve_no => "ReserveNo", :ret_url => "RetUrl", :security_code => "SecurityCode", + :select_key => "Select_Key", :seq_mode => "SeqMode", :service_name => "ServiceName", :service_tel => "ServiceTel", + :sevenatm_payment_term_day => "Sevenatm_Payment_Term_Day", :shop_id => "ShopID", :shop_mail_address => "ShopMailAddress", :shop_pass => "ShopPass", @@ -149,6 +166,49 @@ module Const :tds2_payment_acc_age => "Tds2PaymentAccAge", :tds2_ship_ind => "Tds2ShipInd", :td_tenant_name => "TdTenantName", + :tds2_ch_acc_pw_change => "Tds2ChAccPwChange", + :tds2_nb_purchase_account => "Tds2NbPurchaseAccount", + :tds2_param => "Tds2Param", + :tds2_payment_acc_age => "Tds2PaymentAccAge", + :tds2_provision_attempts_day => "Tds2ProvisionAttemptsDay", + :tds2_ship_address_usage => "Tds2ShipAddressUsage", + :tds2_ship_name_ind => "Tds2ShipNameInd", + :tds2_suspicious_acc_activity => "Tds2SuspiciousAccActivity", + :tds2_txn_activity_day => "Tds2TxnActivityDay", + :tds2_txn_activity_year => "Tds2TxnActivityYear", + :tds2_3ds_req_auth_data => "Tds2ThreeDSReqAuthData", + :tds2_3ds_req_auth_method => "Tds2ThreeDSReqAuthMethod", + :tds2_3ds_req_auth_timestamp => "Tds2ThreeDSReqAuthTimestamp", + :tds2_addr_match => "Tds2AddrMatch", + :tds2_bill_addr_city => "Tds2BillAddrCity", + :tds2_bill_addr_country => "Tds2BillAddrCountry", + :tds2_bill_addr_line1 => "Tds2BillAddrLine1", + :tds2_bill_addr_line2 => "Tds2BillAddrLine2", + :tds2_bill_addr_line3 => "Tds2BillAddrLine3", + :tds2_bill_addr_post_code => "Tds2BillAddrPostCode", + :tds2_bill_addr_state => "Tds2BillAddrState", + :tds2_email => "Tds2Email", + :tds2_home_phone_cc => "Tds2HomePhoneCC", + :tds2_home_phone_subscriber => "Tds2HomePhoneSubscriber", + :tds2_mobile_phone_cc => "Tds2MobilePhoneCC", + :tds2_mobile_phone_subscriber => "Tds2MobilePhoneSubscriber", + :tds2_work_phone_cc => "Tds2WorkPhoneCC", + :tds2_work_phone_subscriber => "Tds2WorkPhoneSubscriber", + :tds2_ship_addr_city => "Tds2ShipAddrCity", + :tds2_ship_addr_country => "Tds2ShipAddrCountry", + :tds2_ship_addr_line1 => "Tds2ShipAddrLine1", + :tds2_ship_addr_line2 => "Tds2ShipAddrLine2", + :tds2_ship_addr_line3 => "Tds2ShipAddrLine3", + :tds2_ship_addr_post_code => "Tds2ShipAddrPostCode", + :tds2_ship_addr_state => "Tds2ShipAddrState", + :tds2_delivery_email_address => "Tds2DeliveryEmailAddress", + :tds2_delivery_time_frame => "Tds2DeliveryTimeframe", + :tds2_gift_card_amount => "Tds2GiftCardAmount", + :tds2_gift_card_count => "Tds2GiftCardCount", + :tds2_gift_card_curr => "Tds2GiftCardCurr", + :tds2_pre_order_date => "Tds2PreOrderDate", + :tds2_pre_order_purchase_ind => "Tds2PreOrderPurchaseInd", + :tds2_reorder_items_ind => "Tds2ReorderItemsInd", :tel_no => "TelNo", :token => "Token", :token_seq => "TokenSeq", @@ -170,6 +230,21 @@ module Const :tds2_type => "Tds2Type" }.freeze + # NOTE: 決済方法によってはcaseに揺らぎがあるのでここで上書きする + PAYMENT_SPECIFIC_PARAMS = { + "ExecTran.idPass" => { + ret_url: "RetUrl" # NOTE: 3Dセキュア認証後にお戻しする加盟店様側のURLになります。 + }, + }.freeze + + def self.input_params(api_method_name) + if PAYMENT_SPECIFIC_PARAMS.key?(api_method_name) + BASE_INPUT_PARAMS.dup.merge!(PAYMENT_SPECIFIC_PARAMS[api_method_name]) + else + BASE_INPUT_PARAMS + end + end + API_ERROR_MESSAGES_EN = { '000' => 'Token acquisition completed normally', '100' => 'Card number Required check error', diff --git a/lib/gmo/http_services.rb b/lib/gmo/http_services.rb index 2e7ad5b..a2918eb 100644 --- a/lib/gmo/http_services.rb +++ b/lib/gmo/http_services.rb @@ -40,7 +40,13 @@ def self.make_request(path, args, verb, options = {}) http.start do |h| response = if verb == "post" - h.post(path, encode_params(args)) + if /\.json\Z/ =~ path + headers = { "Content-Type" => "application/json" } + h.post(path, args.to_json, headers) + else + headers = { "Content-Type" => "application/x-www-form-urlencoded" } + h.post(path, encode_params(args), headers) + end else h.get("#{path}?#{encode_params(args)}") end diff --git a/lib/gmo/remittance_api.rb b/lib/gmo/remittance_api.rb index f8d1032..ed506ce 100644 --- a/lib/gmo/remittance_api.rb +++ b/lib/gmo/remittance_api.rb @@ -250,6 +250,17 @@ def search_balance(options = {}) # Mail_Deposit_Account_Name # Expire # Shop_Mail_Address + # Auth_Code + # Auth_Code2 + # Auth_Code3 + # Remit_Method_Bank + # Mail_Template_Free1 + # Mail_Template_Free2 + # Mail_Template_Free3 + # Mail_Template_Number + # Bank_ID + # Select_Key + # Client_Name ### @return ### # Method # Amount @@ -268,7 +279,7 @@ def search_balance(options = {}) def create_mail_deposit(options = {}) name = "/api/MailDepositRegistration.idPass" options[:method] = 1 - required = %i(deposit_id deposit_email amount deposit_account_name expire deposit_shop_email) + required = %i(deposit_id deposit_email amount expire deposit_shop_email) assert_required_options(required, options) post_request name, options end @@ -314,6 +325,57 @@ def search_mail_deposit(options = {}) post_request name, options end + ######### + # Deposit_ID + # Call_Back_Url + # Amount + # Auth_Code + # Auth_Code2 + # Auth_Code3 + # Remit_Method_Bank + # Remit_Method_Sevenatm + # Sevenatm_Payment_Term_Day + # Remit_Method_Amazongift + # Remit_Method_Aup ay + # Bank_ID + # Client_Name + ### @return ### + # Deposit_ID + # Redirect_Url + # Method + ### example ### + # gmo.create_link_redirect_url({ + # deposit_id: 'dep00001', + # call_back_url: 'https://XXXX/XXXX/XXXX/XXXX', + # amount: '1000', + # auth_code: 'auth00001', + # }) + # {"Deposit_ID"=>"dep00001", "Redirect_Url"=>"https://XXXX/XXXX/XXXX/XXXX", "Method"=>"1"} + def create_link_redirect_url(options = {}) + name = "/api/shop/LinkRedirectUrl.json" + required = %i(deposit_id call_back_url amount auth_code) + assert_required_options(required, options) + post_request name, options + end + + ######### + # Deposit_ID + ### @return ### + # Deposit_ID + # Method + ### example ### + # gmo.cancel_link_redirect_url({ + # deposit_id: 'dep00001', + # }) + # {"Deposit_ID"=>"dep00001", "Method"=>"2"} + def cancel_link_redirect_url(options = {}) + name = "/api/shop/LinkRedirectUrl.json" + required = %i(deposit_id) + options[:method] = 2 + assert_required_options(required, options) + post_request name, options + end + private def api_call(name, args = {}, verb = "post", options = {}) diff --git a/lib/gmo/shop_api.rb b/lib/gmo/shop_api.rb index 453dcaf..cb4e1b5 100644 --- a/lib/gmo/shop_api.rb +++ b/lib/gmo/shop_api.rb @@ -74,8 +74,8 @@ def entry_tran_pay_easy(options = {}) end # 【PayPal決済】 - # 取引登録 - # これ以降の決済取引で必要となる取引IDと取引パスワードの発行を行い、取引を開始します。 + # 取引登録 + # これ以降の決済取引で必要となる取引IDと取引パスワードの発行を行い、取引を開始します。 def entry_tran_paypal(options = {}) name = "EntryTranPaypal.idPass" required = [:order_id, :job_cd, :amount] @@ -83,6 +83,16 @@ def entry_tran_paypal(options = {}) post_request name, options end + # 【銀行振込(バーチャル口座 あおぞら)】 + # 取引登録 + # オーダーIDを指定して取引を登録します。 + def entry_tran_ganb(options = {}) + name = "EntryTranGANB.idPass" + required = [:order_id, :amount] + assert_required_options(required, options) + post_request name, options + end + # 【LINE Pay決済】 # 20.1.2.1. 取引登録 # これ以降の決済取引で必要となる取引IDと取引パスワードの発行を行い、取引を開始します。 @@ -337,7 +347,16 @@ def exec_tran_pay_easy(options = {}) # PayPalと通信を行い決済要求結果を返します。 def exec_tran_paypal(options = {}) name = "ExecTranPaypal.idPass" - # PayPal 決済実行APIの全パターンで共通の必須パラメータのみチェック + required = [:access_id, :access_pass, :order_id, :item_name, :redirect_url] + assert_required_options(required, options) + post_request name, options + end + + # 【銀行振込(バーチャル口座 あおぞら)】 + # 決済実行 + # 登録された取引に対してバーチャル口座を発行します。 + def exec_tran_ganb(options = {}) + name = "ExecTranGANB.idPass" required = [:access_id, :access_pass, :order_id] assert_required_options(required, options) post_request name, options @@ -702,6 +721,39 @@ def search_trade_multi(options = {}) post_request name, options end + ################################################### + # 3DS2.0 対応 + ################################################### + + # 4.3.1.7 3DS2.0認証実行(Tds2Auth) + # DS2.0認証を実行します。 + # 3DS2.0認証初期化URL(RedirectUrl)のコールバックを受けたタイミングで本処理を実行してください。 + def tds2_auth(options = {}) + name = "Tds2Auth.idPass" + required = [:access_id, :access_pass, :tds2_param] + assert_required_options(required, options) + post_request name, options + end + + # 4.3.1.8 3DS2.0認証結果取得(Tds2Result) + # 3DS2.0認証の最終的な認証結果を取得します。 + # 3DS2.0認証チャレンジURL(ChallengeUrl)のコールバックを受けたタイミングで本処理を実行してください。 + def tds2_result(options = {}) + name = "Tds2Result.idPass" + required = [:access_id, :access_pass] + assert_required_options(required, options) + post_request name, options + end + + # 4.3.1.12 3DS2.0認証後決済実行(SecureTran2) + # 3DS2.0サービスの結果を解析し、その情報を使用してカード会社と通信を行い決済を実施して結果を返します。 + def secure_tran_2(options = {}) + name = "SecureTran2.idPass" + required = [:access_id, :access_pass] + assert_required_options(required, options) + post_request name, options + end + private def api_call(name, args = {}, verb = "post", options = {}) diff --git a/lib/gmo/version.rb b/lib/gmo/version.rb index b2f1b09..4f36bdb 100644 --- a/lib/gmo/version.rb +++ b/lib/gmo/version.rb @@ -1,3 +1,3 @@ module GMO - VERSION = "0.5.4" + VERSION = "0.5.9" end diff --git a/spec/gmo/api_spec.rb b/spec/gmo/api_spec.rb index 87965a0..c5372bb 100644 --- a/spec/gmo/api_spec.rb +++ b/spec/gmo/api_spec.rb @@ -29,4 +29,32 @@ end end + describe "#associate_options_to_gmo_params" do + let(:service) { GMO::Payment::API.new() } + + context "with ExecTran.idPass" do + it "converts access_id and access_pass normally" do + options = { + access_id: "test_access_id", + access_pass: "test_access_pass", + ret_url: "https://example.com/callback" + } + result = service.send(:associate_options_to_gmo_params, "ExecTran.idPass", options) + expect(result).to eq({ + "AccessID" => "test_access_id", + "AccessPass" => "test_access_pass", + "RetUrl" => "https://example.com/callback" + }) + end + end + + context "with other API methods" do + it "converts ret_url to RetURL for standard cases" do + options = { ret_url: "https://example.com/callback" } + result = service.send(:associate_options_to_gmo_params, "AnotherAPI", options) + expect(result).to eq({ "RetURL" => "https://example.com/callback" }) + end + end + end + end diff --git a/spec/gmo/net_http_service_spec.rb b/spec/gmo/net_http_service_spec.rb new file mode 100644 index 0000000..7c8d7ca --- /dev/null +++ b/spec/gmo/net_http_service_spec.rb @@ -0,0 +1,88 @@ +require 'spec_helper' + +class FakeNetHTTPService + include GMO::NetHTTPService +end + +describe "GMO::NetHTTPService" do + + describe "#make_request" do + let(:mock_http) { double("Net::HTTP") } + let(:mock_http_session) { double("Net::HTTP session") } + let(:mock_response) { double("Net::HTTPResponse", code: "200", body: "AccessID=test123") } + + before do + allow(Net::HTTP).to receive(:new).and_return(mock_http) + allow(mock_http).to receive(:use_ssl=) + allow(mock_http).to receive(:start).and_yield(mock_http_session) + end + + describe "Content-Type header for form-encoded POST requests" do + it "sets Content-Type to application/x-www-form-urlencoded" do + expect(mock_http_session).to receive(:post) do |path, body, headers| + expect(path).to eq("/payment/EntryTran.idPass") + expect(headers["Content-Type"]).to eq("application/x-www-form-urlencoded") + mock_response + end + + FakeNetHTTPService.make_request( + "/payment/EntryTran.idPass", + { "ShopID" => "shop123", "OrderID" => "order456" }, + "post", + { :host => "example.com" } + ) + end + + it "properly encodes form parameters" do + expect(mock_http_session).to receive(:post) do |path, body, headers| + expect(path).to eq("/payment/EntryTran.idPass") + expect(body).to include("ShopID=") + expect(body).to include("OrderID=") + expect(headers["Content-Type"]).to eq("application/x-www-form-urlencoded") + mock_response + end + + FakeNetHTTPService.make_request( + "/payment/EntryTran.idPass", + { "ShopID" => "shop123", "OrderID" => "order456" }, + "post", + { :host => "example.com" } + ) + end + end + + describe "Content-Type header for JSON POST requests" do + it "sets Content-Type to application/json for .json paths" do + expect(mock_http_session).to receive(:post) do |path, body, headers| + expect(path).to eq("/payment/EntryTran.json") + expect(headers["Content-Type"]).to eq("application/json") + mock_response + end + + FakeNetHTTPService.make_request( + "/payment/EntryTran.json", + { "ShopID" => "shop123" }, + "post", + { :host => "example.com" } + ) + end + end + + describe "GET requests" do + it "appends parameters to query string without Content-Type header" do + expect(mock_http_session).to receive(:get) do |path_with_query| + expect(path_with_query).to include("/payment/SearchTrade.idPass?") + expect(path_with_query).to include("ShopID=") + mock_response + end + + FakeNetHTTPService.make_request( + "/payment/SearchTrade.idPass", + { "ShopID" => "shop123" }, + "get", + { :host => "example.com" } + ) + end + end + end +end diff --git a/spec/gmo/remittance_api_spec.rb b/spec/gmo/remittance_api_spec.rb index 005f1be..1cda601 100644 --- a/spec/gmo/remittance_api_spec.rb +++ b/spec/gmo/remittance_api_spec.rb @@ -1,6 +1,7 @@ # Encoding: UTF-8 require "spec_helper" +require "ostruct" describe "GMO::Payment::RemittanceAPI" do @@ -376,54 +377,76 @@ end describe "#create_mail_deposit" do - let(:do_api_call) { - @service.create_mail_deposit({ - :deposit_id => "dep00001", - :deposit_email => "anyutzy@demo.com", - :amount => 1000, - :deposit_account_name => "An Yutzy", - :expire => 5, - :deposit_shop_email => "anyutzy@demo.com" - }) - } + subject(:do_api_call) { @service.create_mail_deposit(options) } + + context 'with valid options', :vcr do + let(:options) do + { + :deposit_id => "dep00001", + :deposit_email => "anyutzy@demo.com", + :amount => 1000, + :deposit_account_name => "An Yutzy", + :expire => 5, + :deposit_shop_email => "anyutzy@demo.com", + :auth_code => "auth00001", + :auth_code_2 => "auth00002", + :auth_code_3 => "auth00003", + :remit_method_bank => "1", + :mail_template_free_1 => "mail_template_free_1", + :mail_template_free_2 => "mail_template_free_2", + :mail_template_free_3 => "mail_template_free_3", + :mail_template_number => 1, + :bank_id => "bank_id00001", + :select_key => "select00001", + :client_name => "イライニンタロウ", + } + end - it "gets data about a mail deposit", :vcr do - result = do_api_call - result["Deposit_ID"].nil?.should_not be_truthy - result["Method"].nil?.should_not be_truthy - result["Amount"].nil?.should_not be_truthy - result["Expire"].nil?.should_not be_truthy - end + before { allow(GMO).to receive(:make_request).and_call_original } - context 'with all required options' do - let(:response) { OpenStruct.new(status: 200, body: nil ) } - before { allow(GMO).to receive(:make_request) { response } } + it "gets data about a mail deposit" do + result = do_api_call + expect(result["Deposit_ID"]).to eq options[:deposit_id] + expect(result["Method"]).to eq "1" + expect(result["Amount"]).to eq options[:amount].to_s + expect(result["Expire"]).not_to be_nil + end - it "makes request with correct parameters", :vcr do + it "makes request with correct parameters" do + do_api_call path = "/api/MailDepositRegistration.idPass" args = { - "Deposit_ID" => "dep00001", - "Mail_Address" => "anyutzy@demo.com", - "Amount" => 1000, - "Mail_Deposit_Account_Name" => "An Yutzy", - "Expire" => 5, - "Shop_Mail_Address" => "anyutzy@demo.com", + "Deposit_ID" => options[:deposit_id], + "Mail_Address" => options[:deposit_email], + "Amount" => options[:amount], + "Mail_Deposit_Account_Name" => options[:deposit_account_name], + "Expire" => options[:expire], + "Shop_Mail_Address" => options[:deposit_shop_email], + "Auth_Code" => options[:auth_code], + "Auth_Code2" => options[:auth_code_2], + "Auth_Code3" => options[:auth_code_3], + "Remit_Method_Bank" => options[:remit_method_bank], + "Mail_Template_Free1" => options[:mail_template_free_1], + "Mail_Template_Free2" => options[:mail_template_free_2], + "Mail_Template_Free3" => options[:mail_template_free_3], + "Mail_Template_Number" => options[:mail_template_number], + "Bank_ID" => options[:bank_id], + "Select_Key" => options[:select_key], + "Client_Name" => options[:client_name], "Method" => 1, "Shop_ID" => @service.shop_id, "Shop_Pass" => @service.shop_pass } - verb = "post" - options = { :host => @service.host } - expect(GMO).to receive(:make_request).with(path, args, verb, options) + expect(GMO).to have_received(:make_request).with(path, args, "post", { :host => @service.host }) end - - after { do_api_call } end - it "got error if missing options", :vcr do - lambda { - result = @service.create_mail_deposit() - }.should raise_error("Required deposit_id, deposit_email, amount, deposit_account_name, expire, deposit_shop_email were not provided.") + context "with invalid options" do + let(:options) { {} } + + it "got error" do + expect { do_api_call }.to raise_error("Required deposit_id, deposit_email, amount, expire, deposit_shop_email were not provided.") + end end end @@ -503,4 +526,69 @@ end end + describe "#create_link_redirect_url" do + subject(:do_api_call) { @service.create_link_redirect_url(options) } + + context 'with valid options', :vcr do + let(:deposit_id) { "dep00001" } + let(:options) do + { + deposit_id: deposit_id, + call_back_url: "https://example.com/callback", + amount: "1000", + auth_code: "auth00005", + auth_code_2: "auth00002", + auth_code_3: "auth00003", + remit_method_bank: "1", + remit_method_sevenatm: "1", + sevenatm_payment_term_day: "15", + remit_method_amazongift: "1", + remit_method_aupay: "1", + bank_id: "bank_id00001", + client_name: "リンクユーアールエル", + } + end + + it "gets data about link redirect url" do + result = do_api_call + expect(result["Deposit_ID"]).to eq(deposit_id) + expect(result["Redirect_Url"]).not_to be_nil + expect(result["Method"]).to eq("1") + end + end + + context "with invalid options", :vcr do + let(:options) { {} } + + it "got error" do + expect { do_api_call }.to raise_error("Required deposit_id, call_back_url, amount, auth_code were not provided.") + end + end + end + + describe "#cancel_link_redirect_url" do + subject (:do_api_call) { @service.cancel_link_redirect_url(options) } + + before { @service.create_link_redirect_url(deposit_id: deposit_id, call_back_url: 'https://example.com/callback', amount: '100', auth_code: 'AUTH001') } + + context 'with valid options', :vcr do + let(:options) { { deposit_id: deposit_id } } + let(:deposit_id) { "dep00001" } + + it "gets data about a link edirect url" do + result = do_api_call + expect(result["Deposit_ID"]).not_to be_nil + expect(result["Method"]).to eq "2" + end + end + + context "with invalid options", :vcr do + let(:options) { {} } + let(:deposit_id) { "dep00001" } + + it "got error" do + expect { do_api_call }.to raise_error("Required deposit_id were not provided.") + end + end + end end diff --git a/spec/gmo/shop_api_spec.rb b/spec/gmo/shop_api_spec.rb index e1c7c3b..16b1102 100644 --- a/spec/gmo/shop_api_spec.rb +++ b/spec/gmo/shop_api_spec.rb @@ -98,6 +98,44 @@ end end + describe "#entry_tran_paypal" do + it "gets data about a transaction", :vcr do + order_id = @order_id + result = @service.entry_tran_paypal({ + :order_id => order_id, + :job_cd => 'CAPTURE', + :amount => 100 + }) + result["AccessID"].nil?.should_not be_truthy + result["AccessPass"].nil?.should_not be_truthy + end + + it "got error if missing options", :vcr do + lambda { + result = @service.entry_tran_paypal() + }.should raise_error("Required order_id, job_cd, amount were not provided.") + end + end + + describe "#entry_tran_ganb" do + it "gets data about a transaction", :vcr do + order_id = @order_id + result = @service.entry_tran_ganb({ + :order_id => order_id, + :amount => 100 + }) + result["AccessID"].nil?.should_not be_truthy + result["AccessPass"].nil?.should_not be_truthy + end + + it "got error if missing options", :vcr do + lambda { + result = @service.entry_tran_ganb() + }.should raise_error("Required order_id, amount were not provided.") + end + end + + describe "#entry_tran_linepay" do it "gets data about a transaction", :vcr do order_id = @order_id @@ -290,6 +328,28 @@ }.should_not raise_error("Required card_no, expire were not provided.") end + it "converts ret_url to RetUrl for ExecTran.idPass" do + # Test that ret_url is converted to RetUrl by associate_options_to_gmo_params + actual_params = nil + allow(@service).to receive(:api_call) do |name, args, method, options| + actual_params = args + {} + end + + @service.exec_tran({ + :order_id => "test_order", + :access_id => "test_access", + :access_pass => "test_pass", + :method => 1, + :pay_times => 1, + :card_no => "4111111111111111", + :expire => "1405", + :ret_url => "https://example.com/3d-secure-callback" + }) + + expect(actual_params).to include("RetUrl" => "https://example.com/3d-secure-callback") + end + context "parameter contains Japanese characters" do before { require "kconv" unless defined?(Kconv) } @@ -429,6 +489,72 @@ end end + describe "#exec_tran_paypal" do + it "gets data about a transaction", :vcr do + order_id = generate_id + result = @service.entry_tran_paypal({ + :order_id => order_id, + :job_cd => 'CAPTURE', + :amount => 100 + }) + access_id = result["AccessID"] + access_pass = result["AccessPass"] + result = @service.exec_tran_paypal({ + :order_id => order_id, + :access_id => access_id, + :access_pass => access_pass, + :redirect_url => 'https://example.com/path/to/redirect', + :item_name => '購入する商品名' + }) + result["OrderID"].nil?.should_not be_truthy + end + + it "got error if missing options", :vcr do + lambda { + result = @service.exec_tran_paypal() + }.should raise_error("Required access_id, access_pass, order_id, item_name, redirect_url were not provided.") + end + end + + describe "#exec_tran_ganb" do + it "gets data about a transaction", :vcr do + order_id = generate_id + result = @service.entry_tran_ganb({ + :order_id => order_id, + :amount => 100 + }) + access_id = result["AccessID"] + access_pass = result["AccessPass"] + result = @service.exec_tran_ganb({ + :order_id => order_id, + :access_id => access_id, + :access_pass => access_pass, + :client_field_1 => '加盟店自由項目1です。', + :client_field_2 => '加盟店自由項目2です。', + :client_field_3 => '加盟店自由項目3です。', + :account_holder_optional_name => 'コウザタロウ', + :trade_days => '3', + :trade_reason => '取引事由です。', + :trade_client_name => '依頼花子', + :trade_client_mailaddress => 'irai@example.com' + }) + result["BankCode"].nil?.should_not be_truthy + result["BankName"].nil?.should_not be_truthy + result["BranchCode"].nil?.should_not be_truthy + result["BranchName"].nil?.should_not be_truthy + result["AccountType"].nil?.should_not be_truthy + result["AccountNumber"].nil?.should_not be_truthy + result["AccountHolderName"].nil?.should_not be_truthy + result["AvailableDate"].nil?.should_not be_truthy + end + + it "got error if missing options", :vcr do + lambda { + result = @service.exec_tran_ganb() + }.should raise_error("Required access_id, access_pass, order_id were not provided.") + end + end + describe "#exec_tran_linepay" do it "gets data about a transaction", :vcr do order_id = generate_id @@ -653,7 +779,7 @@ result["Approve"].nil?.should_not be true result["TranID"].nil?.should_not be true result["TranDate"].nil?.should_not be true - (result["ClientField1"] == client_field_1).should be true + result["ClientField1"].should eq client_field_1 result["ClientField2"].nil?.should_not be true result["ClientField3"].nil?.should_not be true end @@ -669,7 +795,6 @@ it "should correctly handle Japanese", :vcr do order_id = generate_id - client_field_1 = "〜−¢£¬−‖①ほげほげhogehoge" result = @service.entry_tran_brandtoken({ :order_id => order_id, :job_cd => "AUTH", @@ -683,7 +808,7 @@ :access_pass => access_pass, :token_type => :apple_pay, :token => 'base64encodedtoken', - :client_field_1 => client_field_1 + :client_field_1 => 'カソウシテン' }) result["Status"].nil?.should_not be true result["OrderID"].nil?.should_not be true @@ -691,8 +816,8 @@ result["Approve"].nil?.should_not be true result["TranID"].nil?.should_not be true result["TranDate"].nil?.should_not be true - (result["ClientField1"] == client_field_1).should be true - (result["ClientField1"].encoding.to_s == "UTF-8").should be true + result["ClientField1"].should eq "カソウシテン" + result["ClientField1"].encoding.name.should eq "UTF-8" result["ClientField2"].nil?.should_not be true result["ClientField3"].nil?.should_not be true end @@ -1067,4 +1192,94 @@ end end + describe "#exec_tran with 3DS2.0" do + it "returns 3DS2.0 challenge flow response", :vcr do + result = @service.exec_tran({ + :access_id => "test_access_7ed782e0e10604b31258e0d69ee3e887", + :access_pass => "test_pass_7be5e8786e2e959d7b48ad708634dc7e", + :order_id => "TEST_3DS_20250724231518", + :method => 1, + :pay_times => "", + :card_no => "4111111111111111", + :expire => "2512", + :member_id => "TEST_MEMBER_5df458bc", + :card_seq => 0, + :tds_type => 2, + :tds2_type => 2, + :call_back_url => "https://example.com/callback", + :tds2_ret_url => "https://example.com/3ds/return" + }) + + result["OrderID"].should == "" + result["Forward"].should == "" + result["Method"].should == "1" + result["TranID"].should == "" + result["TranDate"].should == "" + result["Tds2TransResult"].should == "C" + result["Tds2TransResultReason"].should == "01" + result["Tds2ChallengeUrl"].should include("/payment/Tds2Challenge") + result["Tds2TransID"].should == "" + end + end + + describe "#tds2_auth" do + it "executes 3DS2.0 authentication", :vcr do + result = @service.tds2_auth({ + :access_id => "test_access_7ed782e0e10604b31258e0d69ee3e887", + :access_pass => "test_pass_7be5e8786e2e959d7b48ad708634dc7e", + :tds2_param => "dummy_tds2_param" + }) + + result["OrderID"].should == "" + result["Forward"].should == "" + result["Method"].should == "1" + result["PayTimes"].should == "" + result["Approve"].should == "" + result["TranID"].should == "" + result["TranDate"].should == "" + result["CheckString"].should == "" + result["Tds2TransResult"].should == "Y" # Authentication successful + result["Tds2TransResultReason"].should == "" + result["Tds2ChallengeUrl"].should_not be_nil + result["Tds2ChallengeUrl"].should include("/payment/Tds2Challenge") + end + end + + describe "#tds2_result" do + it "gets 3DS2.0 authentication result", :vcr do + result = @service.tds2_result({ + :access_id => "test_access_7ed782e0e10604b31258e0d69ee3e887", + :access_pass => "test_pass_7be5e8786e2e959d7b48ad708634dc7e" + }) + + result["OrderID"].should == "" + result["Forward"].should == "" + result["Method"].should == "1" + result["PayTimes"].should == "" + result["Approve"].should == "" + result["TranID"].should == "" + result["TranDate"].should == "" + result["CheckString"].should == "" + result["Tds2TransResult"].should == "Y" # Authentication successful + result["Tds2TransResultReason"].should == "" + end + end + + describe "#secure_tran_2" do + it "completes payment after 3DS2.0 challenge verification", :vcr do + result = @service.secure_tran_2({ + :access_id => "test_access_7ed782e0e10604b31258e0d69ee3e887", + :access_pass => "test_pass_7be5e8786e2e959d7b48ad708634dc7e" + }) + + result["OrderID"].should == "" + result["Forward"].should == "" + result["Method"].should == "1" + result["PayTimes"].should == "" + result["Approve"].should == "" + result["TranID"].should == "" + result["TranDate"].should == "" + result["CheckString"].should == "" + end + end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e73c928..e257388 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,17 +11,14 @@ require 'gmo' require 'rspec' require 'vcr' +require 'pry' require 'support/config_loader' require 'support/factory' require 'support/vcr' -if RUBY_VERSION < '1.9.0' - require 'support/encoding' -end - RSpec.configure do |config| config.mock_with :rspec config.treat_symbols_as_metadata_keys_with_true_values = true config.filter_run :focus => true config.run_all_when_everything_filtered = true -end \ No newline at end of file +end diff --git a/spec/support/encoding.rb b/spec/support/encoding.rb deleted file mode 100644 index 0d0703a..0000000 --- a/spec/support/encoding.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'kconv' - -class String - @encoding = nil - - def encoding - if @encoding != nil then - return @encoding - else - case Kconv.guess(self) - when Kconv::JIS - return "ISO-2022-JP" - when Kconv::SJIS - return "Shift_JIS" - when Kconv::EUC - return "EUC-JP" - when Kconv::ASCII - return "ASCII" - when Kconv::UTF8 - return "UTF-8" - when Kconv::UTF16 - return "UTF-16BE" - when Kconv::UNKNOWN - return nil - when Kconv::BINARY - return nil - else - return nil - end - end - end - -end \ No newline at end of file