Skip to content

Commit

Permalink
Merge pull request #2 from nekoding/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
nekoding committed Nov 3, 2022
2 parents d7fa482 + 4077886 commit 44c3d6c
Show file tree
Hide file tree
Showing 14 changed files with 464 additions and 287 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ All notable changes to `laravel-softbank` will be documented in this file
## 1.0.0 - 201X-XX-XX

- initial release

## 1.2.0

- save card using cust_code
- Get saved card info

## 1.3.0

- Add multi lang error message (support : en and ja)
- Add new config env
11 changes: 6 additions & 5 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* You can place your custom package configuration in here.
*/
return [
'merchant_id' => env('SOFTBANK_MERCHANT_ID'),
'service_id' => env('SOFTBANK_SERVICE_ID'),
'hash_key' => env('SOFTBANK_HASH_KEY'),
'api_endpoint' => env('SOFTBANK_API_ENDPOINT', "https://stbfep.sps-system.com/api/xmlapi.do"),
'token_endpoint' => env('SOFTBANK_TOKEN_ENDPOINT', "https://stbtoken.sps-system.com/sbpstoken/com_sbps_system_token.js")
'merchant_id' => env('SOFTBANK_MERCHANT_ID'),
'service_id' => env('SOFTBANK_SERVICE_ID'),
'hash_key' => env('SOFTBANK_HASH_KEY'),
'api_endpoint' => env('SOFTBANK_API_ENDPOINT', "https://stbfep.sps-system.com/api/xmlapi.do"),
'token_endpoint' => env('SOFTBANK_TOKEN_ENDPOINT', "https://stbtoken.sps-system.com/sbpstoken/com_sbps_system_token.js"),
'error_message_locale' => env('SOFTBANK_ERROR_MESSAGE_LC', 'en'),
];
71 changes: 71 additions & 0 deletions resources/lang/en/error_sbpayment_item.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

return [
"101" => [
"200" => "credit card number",
"201" => "credit card expiration date",
"202" => "Transaction Class",
"203" => "number of divisions",
"204" => "Bonus Combined Times",
"205" => "Credit card information save flag",
"206" => "Remarks 1",
"207" => "Remarks 2 ",
"208" => "Remarks 3",
"209" => "Security Code",
"210" => "Unused error code",
"211" => "Unused error code",
"212" => "Unused error code",
"213" => "Unused error code",
"214" => "Payment information usage specific type",
"215" => "Settlement payment method usage specific type",
"216" => "Return type of input information at payment",
"217" => "Credit card brand return flag",
"218" => "Unused error code",
"219" => "Unused error code",
"220" => "Unused error code",
"221" => "Unused error code",
"222" => "Unused error code",
"223" => "Unused error code",
"224" => "Unused error code",
"225" => "Refund number",
"226" => "Unused error code",
"227" => "token",
"228" => "token key",
"229" => "permanent token ",
"000" => "Unused error code",
],

"_" => [
"000" => "API Request ID",
"001" => "Merchant ID",
"002" => "Service ID",
"003" => "Customer ID ",
"004" => "Purchase ID ",
"005" => "Product ID",
"006" => "product name",
"007" => "tax amount",
"008" => "In ST02, this occurs when parameters are set incorrectly in Sales, Partial Refund",
"009" => "Result notification destination CGI",
"010" => "Free field 1 ",
"011" => "Free field 2 ",
"012" => "Free field 3 ",
"013" => "Billing number branch number",
"014" => "Line number",
"015" => "Line Item ID ",
"016" => "description product name",
"017" => "Item quantity",
"018" => "Line tax amount",
"019" => "detailed amount (including tax) ",
"020" => "settlement type",
"021" => "last billing month",
"022" => "Campaign Type ",
"023" => "request date and time",
"024" => "Request Allowed Time",
"025" => "checksum",
"026" => "Processed SBPS Transaction ID",
"027" => "Occurs only when specifying an invalid tracking ID for processing",
"028" => "3DES encryption flag",
"029" => "Date processed",
"030" => "Occurs only for credit card payments in ST01",
]
];
32 changes: 32 additions & 0 deletions resources/lang/en/error_sbpayment_method.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

return [
"101" => "Indicates that an error occurred during credit card payment.",
"305" => "An error occurred with Rakuten Pay (online payment).",
"306" => "Indicates a PayPal payment error.",
"307" => "This indicates that an error occurred in the Yahoo! Wallet digital conversion version.",
"309" => "An error occurred in Recruit Easy Payment.",
"310" => "An error occurred in LINE Pay.",
"311" => "An error has occurred with PayPay (online payment).",
"313" => "An error occurred in the wallet payment service (Type-Y).",
"314" => "An error has occurred in Merpay Net payment.",
"315" => "An error occurred with Amazon Pay.",
"316" => "An error has occurred in Epos Easy Payment.",
"401" => "Indicates an error occurred with d payment (carrier).",
"402" => "Indicates that an error occurred in au Easy Payment.",
"405" => "Indicates that an error occurred in SoftBank Collective Payment (B).",
"406" => "An error has occurred with au PAY (Internet payment).",
"510" => "Indicates an error code for Alipay international payment.",
"513" => "Indicates that an error occurred during JCB PREMO or House Prepaid Payment.",
"514" => "Indicates that an error occurred during UnionPay online payment.",
"601" => "Indicates an error occurred with Apple Pay.",
"604" => "Indicates an error occurred with Google Pay.",
"701" => "Indicates that an error occurred in convenience store payment.",
"702" => "Indicates that an error has occurred in the general transfer settlement.",
"703" => "Indicates a Pay-easy payment error.",
"710" => "Indicates that an error occurred in NP Postpay.",
"805" => "Indicates that an error has occurred in Eikyufumetsu Point payment.",
"806" => "An error occurred in the T point program (online payment).",
"912" => "Indicates an error occurred with the email link type.",
"999" => "Indicates that an error occurred in a common item."
];
98 changes: 98 additions & 0 deletions resources/lang/en/error_sbpayment_type.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?php

return [
"101" => [
"20" => "For MG02 only for registration and renewal requests",
"21" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"22" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"23" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"24" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"25" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"26" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"27" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"28" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"29" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"30" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"31" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"32" => "For ST02, this only occurs for confirmation, cancellation and refund requests",
"33" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"34" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"35" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"36" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"37" => "Occurs when an unfair sales request is made",
"38" => "Occurs when an unfair sales request is made",
"39" => "Occurs when an unfair sales request is made",
"40" => "Occurs when an unfair sales request is made",
"41" => "Occurs when an unfair sales request is made",
"42" => "Occurs when an unfair sales request is made",
"43" => "Occurs when requesting an unauthorized or partial refund",
"44" => "Occurs when requesting an unauthorized or partial refund",
"45" => "Occurs when requesting an unauthorized or partial refund",
"46" => "Occurs when requesting an unauthorized or partial refund",
"47" => "Occurs when requesting an unauthorized or partial refund",
"48" => "Unused error code",
"49" => "In case of unfair cancellation or partial refund request",
"50" => "Occurs when an unjustified cancellation request is made",
"51" => "Occurs when an unjustified cancellation request is made",
"52" => "Occurs when an invalid cancellation request is made",
"53" => "Unused error code",
"54" => "Occurs when an unjustified cancellation request is made",
"55" => "unused error code",
"56" => "Refund within an unreasonable period, only for partial refund requests",
"57" => "Occurs only when recurring billing is stopped",
"58" => "Occurs when canceling customer information while using recurring billing ",
"59" => "Please process a refund. Occurs when requesting a refund for an illegal transaction ",
"60" => "Occurs when a confirmation request is made for a transaction in an invalid state",
"61" => "Occurs only for confirmation, cancellation and refund requests in ST02",
"62" => "Unused error code",
"63" => "Occurs only when Authentication Assist is installed in one-time purchase or recurring purchase",
"64" => "Possibility of occurrence only when SmartLink is installed in one-time purchase or continuous purchase",
"65" => "Occurs when the error on the right is returned from the payment company 'G12: Card not usable' ",
"66" => "Occurs when the error on the right is returned from the settlement company 'G30: Transaction decision pending (manned decision)'",
"67" => "Occurs when the error on the right is returned from the settlement company 'G44: Security code error'",
"68" => "Occurs when the error on the right is returned from the settlement company 'G54: 1 account usage or amount error'",
"69" => "Occurs when the error on the right is returned from the settlement company 'G55: Daily limit exceeded' ",
"70" => "Occurs when the error on the right is returned from the settlement company 'G60: Accident card'",
"71" => "Occurs when the error on the right is returned from the settlement company 'G61: invalid card'",
"72" => "Occurs when the error on the right is returned from the settlement company 'G65: Membership number error'",
"73" => "Occurs when the error on the right is returned from the settlement company 'G83: Expiration date error'",
"74" => "Occurs when the error on the right is returned from the settlement company 'G85: Service not covered error'",
"75" => "Occurs when the error on the right is returned from the settlement company (1: Unmatched (collation NG)) ",
"76" => "Occurs when the error on the right is returned from the settlement company (9: Inquiry not possible) ",
"77" => "Occurs when the error on the right is returned from the settlement company (5: Proxy authorization at SLN Center)",
"78" => "Occurs when the credit card information saving flag element is not set correctly for one-time purchase and re-credit.",
"79" => "Occurs when an unfair sales request is made",
"K0" => "Occurs when an unfair partial refund request is made",
"K1" => "The partial refund has been canceled because the total refund amount exceeds the sales amount. Unfair partial refund",
"K2" => "Credit card not accepted (G30: This transaction has been put on hold.) ",
"K3" => "request parameter error",
"K4" => "credit result does not exist error",
"K5" => "Error due to change request for successfully credited transaction",
"W0" => "Occurs when an unfair sales request is made",
"W1" => "Occurs when an unreasonable sales request is made",
"W2" => "Occurs when an unfair refund request is made",
"W3" => "Occurs when an unfair refund request is made",
"W4" => "Occurs when an unfair partial refund request is made",
"W5" => "Occurs when an unfair refund request is made",
"W6" => "Occurs when an unfair cancellation/refund request is made",
],

"_" => [
"80" => "In case of our internal system error",
"81" => "Occurs only in case of validation discrepancies in request parameters internally by our company ",
"82" => "Unused error code",
"83" => "Occurs only when there is no record of the corresponding payment within our company ",
"84" => "Occurs when payment company fails ",
"85" => "Occurs when payment company fails ",
"86" => "In ST02, it occurs only for confirmation, cancellation, and refund requests for credit card payments. In ST02, it occurs for all requests other than credit card payments.",
"90" => "API encountered an unexpected error",
"91" => "Unused error code",
"92" => "Failed to connect to GW",
"93" => "Retry limit exceeded",
"94" => "Payment request not completed",
"95" => "The credit card information registration status is inconsistent with the management request * Credit card information has been registered in the credit card information registration request, etc.",
"96" => "request request with same purchase ID, same invoice number",
"97" => "request request with the same tracking ID to be processed and the same refund serial number",
"98" => "Inconsistent permanent token registration state",
]
];
71 changes: 71 additions & 0 deletions resources/lang/ja/error_sbpayment_item.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

return [
"101" => [
"200" => "クレジットカード番号 ",
"201" => "クレジットカード有効期限 ",
"202" => "取引区分 ",
"203" => "分割回数 ",
"204" => "ボーナス併用回数 ",
"205" => "クレジットカード情報保存フラグ ",
"206" => "備考欄 1 ",
"207" => "備考欄 2 ",
"208" => "備考欄 3 ",
"209" => "セキュリティコード ",
"210" => "使用していないエラーコード",
"211" => "使用していないエラーコード",
"212" => "使用していないエラーコード",
"213" => "使用していないエラーコード",
"214" => "決済情報使用特定タイプ ",
"215" => "決済支払方法使用特定タイプ ",
"216" => "決済時入力情報返却タイプ ",
"217" => "クレジットカードブランド返却フラグ ",
"218" => "使用していないエラーコード",
"219" => "使用していないエラーコード",
"220" => "使用していないエラーコード",
"221" => "使用していないエラーコード",
"222" => "使用していないエラーコード",
"223" => "使用していないエラーコード",
"224" => "使用していないエラーコード",
"225" => "返金枝番 ",
"226" => "使用していないエラーコード",
"227" => "トークン",
"228" => "トークンキー ",
"229" => "永久トークン ",
"000" => "使用していないエラーコード",
],

"_" => [
"000" => "API リクエスト ID",
"001" => "マーチャント ID",
"002" => "サービス ID",
"003" => "顧客 ID ",
"004" => "購入 ID ",
"005" => "商品 ID ",
"006" => "商品名称 ",
"007" => "税額 ",
"008" => "ST02 では売上、部分返金でパラメーターが正しく設定されていない場合に発生 ",
"009" => "結果通知先 CGI ",
"010" => "自由欄 1 ",
"011" => "自由欄 2 ",
"012" => "自由欄 3 ",
"013" => "請求番号枝番 ",
"014" => "明細行番号 ",
"015" => "明細商品 ID ",
"016" => "明細商品名称 ",
"017" => "明細数量 ",
"018" => "明細税額 ",
"019" => "明細金額(税込) ",
"020" => "決済区分 ",
"021" => "最終課金月 ",
"022" => "キャンペーンタイプ ",
"023" => "リクエスト日時 ",
"024" => "リクエスト許容時間 ",
"025" => "チェックサム ",
"026" => "処理対象 SBPS トランザクション ID ",
"027" => "不当な処理対象トラッキング ID を指定した場合に限り発生 ",
"028" => "3DES 暗号化フラグ",
"029" => "処理日時 ",
"030" => "ST01 ではクレジットカード決済に限り発生 ",
]
];
32 changes: 32 additions & 0 deletions resources/lang/ja/error_sbpayment_method.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

return [
"101" => "クレジットカード決済でエラー発生したことを示します。",
"305" => "楽天ペイ(オンライン決済)でエラー発生したことを示します。",
"306" => "ペイパル決済でエラー発生したことを示します。",
"307" => "Yahoo!ウォレット決済デジコン版でエラー発生したことを示します。 ",
"309" => "リクルートかんたん支払いでエラー発生したことを示します。",
"310" => "LINE Pay でエラー発生したことを示します。",
"311" => "PayPay(オンライン決済)でエラー発生したことを示します。",
"313" => "ウォレット決済サービス(Type-Y)でエラー発生したことを示します。",
"314" => "メルペイネット決済でエラー発生したことを示します。",
"315" => "Amazon Pay でエラー発生したことを示します。",
"316" => "エポスかんたん決済でエラー発生したことを示します。",
"401" => "d 払い(キャリア)でエラー発生したことを示します。",
"402" => "au かんたん決済でエラー発生したことを示します。",
"405" => "ソフトバンクまとめて支払い(B)でエラー発生したことを示します。",
"406" => "au PAY(ネット支払い)でエラー発生したことを示します。 ",
"510" => "Alipay 国際決済でのエラーコードを示します。 ",
"513" => "JCB PREMO 決済・ハウスプリペイド決済でエラー発生したことを示します。",
"514" => "銀聯ネット決済でエラー発生したことを示します。",
"601" => "Apple Pay でエラー発生したことを示します。 ",
"604" => "Google Pay でエラー発生したことを示します。",
"701" => "コンビニ決済でエラー発生したことを示します。",
"702" => "総合振込決済でエラー発生したことを示します。",
"703" => "Pay-easy 決済でエラー発生したことを示します。",
"710" => "NP 後払いでエラー発生したことを示します。",
"805" => "永久不滅ポイント決済でエラー発生したことを示します。",
"806" => "T ポイントプログラム(オンライン決済)でエラー発生したことを示します。",
"912" => "メールリンク型でエラー発生したことを示します。",
"999" => "共通項目でエラー発生したことを示します。 "
];
Loading

0 comments on commit 44c3d6c

Please sign in to comment.