WEB JS SDK / Get Credit Card Binding Page

Get Credit Card Binging Page

Before using ECPay’s Embedded Checkout Credit Card Binging Page, merchant’s server should call ECPay’s API to get a Token. After receiving the token, merchants should set this token onto merchant’s webpage with the integration of ECPay’s JavaScript SDK to access the binding credit card page.

ECPay.addBindingCard(Token, Language, callBack(errMsg))

INPUT

Token String
Required

  • A token used to validate merchant’s identity
  • The lifespan is 30 minutes.

Language String
Required

To use multilingual function, and Two languages are avaliable:

  • ECPay.Language.zhTW : Traditional Chinese
  • ECPay.Language.enUS: English

callBack description

The callback function after addBindingCard is completed. For example, if initialization fails, error message received by the callBack.

function (errMsg) {}

Example of how to use the addBindingCard

ECPay.initialize(serverType, function (errMsg) {
    var lang = getCookie("language");
    if (!lang) {
        lang = ECPay.Language.zhTW;
        }
ECPay.addBindingCard("55a026b8df314f9bb2dc808a5fe21c9d", lang, function (errMsg) {
        //to do..
    });
});

Copyright © Green World FinTech Service Co., Ltd. All rights reserved.

綠界官方網站