Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMO後払い専用のGatewayを、全てのリンク決済で利用できるGatewayに置き換え #110

Merged
merged 3 commits into from
Apr 30, 2020

Conversation

odaillyjp
Copy link
Contributor

@odaillyjp odaillyjp commented Apr 23, 2020

やったこと

  • GMO後払い専用のGatewayである EpsilonGmoAfterGateway を削除
  • 代わりに、全てのリンク決済で利用できる EpsilonLinkPaymentGateway を追加
  • 決済区分コード st_code は呼び出し側で指定した値を使うように修正
  • ruby 2.3.8 でのCIを削除
    • 依存gemが2.3のサポートを終了していて、CIが落ちていた
    • ruby 2.3.8 自体もサポート終了している

このPRによって変わること

GMO後払い決済を行うときの呼び出し方が変わります。

変更前

ActiveMerchant::Billing::EpsilonGmoAfterGateway.contract_code = 'YOUR_CONTRACT_CODE'
gateway = ActiveMerchant::Billing::EpsilonGmoAfterGateway.new
amount = 10000

purchase_detail = {
  user_id:           'YOUR_APP_USER_IDENTIFIER',
  user_name:         '山田 太郎',
  user_email:        '[email protected]',
  user_tel:          '0312345678',
  item_code:         'ITEM001',
  item_name:         'Greate Product',
  order_number:      'UNIQUE ORDER NUMBER',
  consignee_postal:  '1500002',
  consignee_name:    '山田 太郎',
  consignee_address: '東京都渋谷区1-1-1',
  consignee_tel:     '0312345678',
  orderer_postal:    '1500002',
  orderer_name:      '山田 太郎',
  orderer_address:   '東京都渋谷区1-1-1',
  orderer_tel:       '0312345678',
  memo1:             'memo1',
  memo2:             'memo2',
}

response = gateway.purchase(amount, purchase_detail)

変更後

ActiveMerchant::Billing::EpsilonLinkPaymentGateway.contract_code = 'YOUR_CONTRACT_CODE'
gateway = ActiveMerchant::Billing::EpsilonLinkPaymentGateway.new

amount = 10000

purchase_detail = {
  user_id:           'YOUR_APP_USER_IDENTIFIER',
  user_name:         '山田 太郎',
  user_email:        '[email protected]',
  user_tel:          '0312345678',
  item_code:         'ITEM001',
  item_name:         'Greate Product',
  order_number:      'UNIQUE ORDER NUMBER',
  st_code:           'SETTLEMENT_CODE', // これを新たに追加する
  consignee_postal:  '1500002',
  consignee_name:    '山田 太郎',
  consignee_address: '東京都渋谷区1-1-1',
  consignee_tel:     '0312345678',
  orderer_postal:    '1500002',
  orderer_name:      '山田 太郎',
  orderer_address:   '東京都渋谷区1-1-1',
  orderer_tel:       '0312345678',
  memo1:             'memo1',
  memo2:             'memo2',
}

response = gateway.purchase(amount, purchase_detail)

参考: イプシロン決済システム仕様書 Ver.1.0.41 p44, 45

Copy link
Contributor

@ku00 ku00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMです!

Copy link

@yorimitsu yorimitsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よさそうです 🙆

README.md Outdated
@@ -302,12 +302,12 @@ else
end
```

### GMO Payment After Delivery
### GMO Link Payment Delivery
Copy link

@ksbmyk ksbmyk Apr 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「Delivery」不要かも?と思います
「GMO後払い」の英語名が「GMO Payment After Delivery」だったので「Delivery」ついていた背景だったと思うので

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「Link Payment」がリンクタイプ決済の総称である(このGatewayがすべてのリンクタイプの決済で使える)ことがわかるように補足があっても親切そうですね(急いでマージした方がよければ後から追加でも)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「Link Payment」がリンクタイプ決済の総称である(このGatewayがすべてのリンクタイプの決済で使える)ことがわかるように補足があっても親切そうですね

EpsilosLinkPaymentGateway is available in all link payments.
For example, GMO Payment After Delivery.

と書いておきますね。

@ksbmyk
Copy link

ksbmyk commented Apr 28, 2020

READMEにコメントしましたが、実装の方はよさそうです 🙆

Copy link

@ksbmyk ksbmyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

対応ありがとうございますー!LGTMです 🙆

@odaillyjp
Copy link
Contributor Author

@ksbmyk
README 変更しましたのでご確認いただけますと 🙏 fc05079

ksbmyk
ksbmyk approved these changes Apr 30, 2020
@odaillyjp
Copy link
Contributor Author

レビューありがとうございます!
マージして、別途バージョンアップのPRを出します。

@odaillyjp odaillyjp merged commit 206e513 into master Apr 30, 2020
@odaillyjp odaillyjp deleted the add-link-payment-gateway branch April 30, 2020 01:43
@odaillyjp odaillyjp mentioned this pull request Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants