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) ์ธ์ฆ ๋ฐฉ๋ฒ•์œผ๋กœ ๋‹ค์Œ ๋‘ ๊ฐ€์ง€๋ฅผ ์ง€์›ํ•จ
      • 1: ๋ฆฌ๋ชจ์ฝ˜
      • 2: ์Œ์„ฑ
  • 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");
    }
});