payment.otvReqPayToken - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki
gigagenie.payment.otvReqPayToken
API ์ค๋ช
- OTV ๊ฒฐ์ ํ ํฐ ์์ฒญ API
- OTV ๊ฒฐ์ ํ ํฐ์ ์์ฒญํจ
- ๊ฒฐ์ ๊ฐ ๋ถ๊ฐ๋ฅํ ๊ฒฝ์ฐ(๋ชฉ์๋ฆฌ ๋ฏธ๋ฑ๋ก, OPAY ํ์ ๋ฏธ๊ฐ์
๋ฑ๋ฑ) ์๋ฌ ์ฝ๋๋ง ๋ฆฌํดํจ
API ๊ตฌ์กฐ
- function otvReqPayToken(options,callback)
options
homeShoppingCode
: (String, Mandatory) ์ ํด์ฌ ์ฝ๋
payOption
: (Number, Mandatory) ์ธ์ฆ ๋ฐฉ๋ฒ์ผ๋ก ๋ค์ ๋ ๊ฐ์ง๋ฅผ ์ง์ํจ
result_cd
200
: ์ฑ๊ณต
500
: ์์คํ
Error
extra
reqResult
: (String) ์ธ์ฆ ๊ฒฐ๊ณผ
purchaseAuthToken
: (String) OTV ๊ฒฐ์ ํ ํฐ
์ฌ์ฉ ์์
// callback ๋ฐฉ์
var options = {};
options.homeShoppingCode = "1111111111";
options.payOption = 2;
gigagenie.payment.otvReqPayToken(options, function (result_cd, result_msg, extra) {
if (result_cd === 200) {
if (extra.reqResult == "Success") {
console.log("PayToken: " + extra.purchaseAuthToken);
}
} else {
console.log("reqPayToken Fail");
}
});