payment.otvReqPayTokenWithAuth - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.payment.otvReqPayTokenWithAuth

API ์„ค๋ช…

  • OTV ๊ฒฐ์ œ ์ธ์ฆ-ํ† ํฐ ์š”์ฒญ API
  • OTV ๊ฒฐ์ œ ํ† ํฐ์„ ์š”์ฒญํ•จ
  • ๊ฒฐ์ œ๊ฐ€ ๋ถˆ๊ฐ€๋Šฅํ•œ ๊ฒฝ์šฐ(๋ชฉ์†Œ๋ฆฌ ๋ฏธ๋“ฑ๋ก, OPAY ํšŒ์› ๋ฏธ๊ฐ€์ž… ๋“ฑ๋“ฑ)์˜ ๊ฒฝ์šฐ ํ•ด๋‹น ์ธ์ฆ-๊ฐ€์ž… ๋‹จ๊ณ„ ์ง„ํ–‰ ํ›„ ๊ฒฐ์ œ ํ† ํฐ์„ ๋ฐœ๊ธ‰ํ•จ

API ๊ตฌ์กฐ

  • function otvReqPayTokenWithAuth(options,callback)
  • options
    • homeShoppingCode: (String, Mandatory) ์ œํœด์‚ฌ ์ฝ”๋“œ
    • payOption: (Int, Mandatory) ์ธ์ฆ ๋ฐฉ๋ฒ•์œผ๋กœ ๋‹ค์Œ ๋‘ ๊ฐ€์ง€๋ฅผ ์ง€์›ํ•จ
      • 1: ๋ฆฌ๋ชจ์ฝ˜
      • 2: ์Œ์„ฑ
    • packageName: (String, Mandatory) ํŒจํ‚ค์ง€๋ช…
  • result_cd
    • 200: ์„ฑ๊ณต
    • 500: ์‹œ์Šคํ…œ Error
  • extra
    • reqResult: (String) ์ธ์ฆ ๊ฒฐ๊ณผ
    • purchaseAuthToken: (String) OTV ๊ฒฐ์ œ ํ† ํฐ

์‚ฌ์šฉ ์˜ˆ์‹œ

// callback ๋ฐฉ์‹
var options = {};
options.homeShoppingCode = "1111111111";
options.payOption = 2;
gigagenie.payment.otvReqPayTokenWithAuth(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");
    }
});