NAV
java

MYPAY APP 技術串接手冊

名詞定義

名詞 定義 備注
串接方POS系統 串接方所開發的POS系統,可能是Web POS或App
串接方App 串接方的App,也就是呼叫使用MYPAY APP的App
卡機 刷卡機的簡稱,指可以安裝MYPAY APP的設備,但在MYPAY TAP APP的情況下,通常指一般有NFC功能的設備,而非EMV裝置
藍牙裝置 支援藍牙傳輸資料的裝置
MYPAY Server 提供MYPAY金流服務的Server
MYPAY APP 提供給串接方App呼叫進行交易或查詢的App
MYPAY TAP APP 提供給串接方App呼叫進行交易或查詢的App 為支援Tap to phone功能的MYPAY APP,而目前只支援Android 8.0以上有NFC功能且非EMV設備的裝置,除了上述功能外,其餘功能與MYPAY APP完全相同
MyPayCommon 提供給串接方App進行串接MYPAY APP使用的AAR Lib 下載連結為MyPayCommon
AppRequest & AppResponse 串接方自行定義的request和response類別,可將其轉換為JSON Object string放入或取出ActionDetails.data,用來跟MYPAY APP溝通 Lib 0.0.45

串接準備

在串接方App專案下的app/libs放入MyPayCommon_vX.X.X_release.aar (X.X.X為版本號,請使用最新版的AAR),並於app/build.gradle中加入

android {
    ...
    repositories {
        flatDir {
            dirs 'libs'
        }
    }
    ...
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation(name:'MyPayCommon_vX.X.X_release', ext:'aar')
    ...
}

若串接方App須打包為release app時,請於app/proguard-rules.pro中加入

-keep class tw.com.mypay.common.** { *; }

決定要呼叫的MYPAY APP是測試還是正式的版本

PACKAGE_NAME TARGET_ACTIVITY_NAME 環境
cc.usecase.mypay tw.com.mypay.MainActivity 測試
tw.com.mypay tw.com.mypay.MainActivity 正式

支援的串接方式

串接的方式可分為兩類︰裝置外部與裝置內部。

  • 裝置外部︰表示串接方的程式在裝置的外部,如網路串接刷卡機模式與藍牙模式。
  • 裝置內部︰表示串接方的程式在裝置的內部,如Cross App模式與瀏覽器模式。

網路串接刷卡機模式

注意︰

此為透過API呼叫MYPAY Server的方式串接MYPAY APP,詳情請參考︰網路串接刷卡機設計概要

藍牙模式 (點此跳到)

注意︰

  • 目前只提供Android串接方式的範例,若使用其它程式語言可能會有無法串接的問題。
  • MYPAY APP中的藍牙傳輸設定裡的掃碼功能(v4.0.6),必須是使用此串接模式才可以正常將資料傳到接收方的應用中,無法使用其它方式接收此資料。

Cross App模式 (點此跳到)

瀏覽器模式 (點此跳到)

Cross App呼叫MYPAY APP交易(ActionDetails)

使用tw.com.mypay.common.ActionDetails傳入所需的資料,再透過Intent傳送到MYPAY APP,以下為範例︰

直接交易

進行交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private ActionDetails getTransactionActionDetails(Object appRequest) {
        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_SEND_TRANSACTION);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        return actionDetails;
    }

    private void sendCreditCardTransaction() {  // 信用卡交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setPayModeId(Constant.PAY_MODE_ID_CREDIT_CARD);

        ActionDetails actionDetails = getTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendOfflineTransaction() {  // 所有線下交易,掃碼收款
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setPayModeId(Constant.PAY_MODE_ID_OFFLINE_ALL);

        ActionDetails actionDetails = getTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendScanQrCodeTransaction() {  // 產生QrCode,線上
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setPayModeId(Constant.PAY_MODE_ID_LINE_PAY);  // LINE Pay線上
        //appRequest.setPayModeId(Constant.PAY_MODE_ID_PI);  // Pi 拍錢包線上
        //appRequest.setPayModeId(Constant.PAY_MODE_ID_JKO);  // 街口支付線上
        //appRequest.setPayModeId(Constant.PAY_MODE_ID_WECHAT);  // 微信支付線上
        //appRequest.setPayModeId(Constant.PAY_MODE_ID_ALIPAY);  // 支付寶線上
        //appRequest.setPayModeId(Constant.PAY_MODE_ID_EASY_WALLET);  // 悠遊付線上

        ActionDetails actionDetails = getTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行交易查詢

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryTransaction() {  // 交易查詢
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_QUERY_TRANSACTION);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行退款

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void refund() {  // 退款
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setInvoiceState(Constant.INVOICE_STATE_VOID);  // 作廢或作廢重開

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_REFUND);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

TAP交易(只有MYPAY TAP APP支援)

進行交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void sendTapTransaction() {  // TAP交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_TAP);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

一卡通交易(Lib 0.2.0)

進行詢卡

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryCard() {  // 詢卡
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setType(1);  // 快速詢卡
        //appRequest.setType(2);  // 離線詢卡
        //appRequest.setType(3);  // 連線詢卡

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_I_PASS_QUERY_CARD);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行扣值交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void redeem() {  // 扣值交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setType(1);

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_I_PASS_REDEEM);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行現金加值交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void reload() {  // 現金加值交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setType(3);

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_I_PASS_RELOAD);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行取消交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void cancelTransaction() {  // 取消交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setType(2);  // 取消扣值交易
        //appRequest.setType(4);  // 取消現金加值交易

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_I_PASS_CANCEL);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行退貨加值交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void refund() {  // 退貨加值交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setType(5);

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_I_PASS_REFUND);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行結班

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void closeBatch() {  // 結班
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_I_PASS_CLOSE_BATCH);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

其它動作(Lib 0.1.5)

進行列印(直接列印,不處理交易資料)

注意︰

此動作為單純將串接方的資料排列處理並列印成MYPAY制式的單據,不會產生交易與發票相關的資料,只是將MYPAY APP當作印表機使用。

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void print() {  // 列印
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setPrintMode(Constant.PRINT_MODE_INVOICE_AND_DETAILS);  // 列印發票加明細
        //appRequest.setPrintMode(Constant.PRINT_MODE_INVOICE);  // 列印發票
        //appRequest.setPrintMode(Constant.PRINT_MODE_DETAILS);  // 列印明細
        //appRequest.setPrintMode(Constant.PRINT_MODE_CREDIT_CARD_RECEIPT);  // 重印簽單

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_PRINT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行掃碼回傳

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void scanCode() {  // 掃碼回傳
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_SCAN_CODE);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行查詢合作夥伴折扣碼

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryCouponCode() {  // 查詢合作夥伴折扣碼
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_QUERY_COUPON_CODE);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行取得特店支援之支付方式

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void getSupportedPayModes() {  // 取得特店支援之支付方式
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_GET_SUPPORTED_PAY_MODES);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行取得自行收款設定

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void getSupportedPayModes() {  // 取得特店支援之支付方式
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_GET_SUPPORTED_ACTUAL_PAY_MODES);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

MYPAY頁面(Lib 0.1.8)

進入金流訂單列表頁

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void gotoMyPayOrderListPage() {  // 進入金流訂單列表頁
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.PAGE_MYPAY_ORDER_LIST);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }
}

進入點餐單列表頁

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void gotoMyPayFoodOrderListPage() {  // 進入點餐單列表頁
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.PAGE_MYPAY_FOOD_ORDER_LIST);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }
}

進入發票管理頁

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void gotoMyPayInvoiceManagementPage() {  // 進入發票管理頁
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.PAGE_MYPAY_INVOICE_MANAGEMENT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }
}

進入收據管理頁

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void gotoMyPayReceiptManagementPage() {  // 進入收據管理頁
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.PAGE_MYPAY_RECEIPT_MANAGEMENT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }
}

進入印表機設定頁

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void gotoMyPayPrinterSettingsPage() {  // 進入印表機設定頁
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.PAGE_MYPAY_PRINTER_SETTINGS);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }
}

進入交易回傳設定頁

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void gotoMyPayUrlSettingsPage() {  // 進入交易回傳設定頁
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.PAGE_MYPAY_URL_SETTINGS);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }
}

進入結班設定頁

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void gotoMyPaySettlementSettingsPage() {  // 進入結班設定頁
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.PAGE_MYPAY_SETTLEMENT_SETTINGS);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }
}

39Buy交易(Lib 0.0.56)

進行登入

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void login() {  // 登入
        YourAppRequest appRequest = getAppRequest();  // 你的app request

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_LOGIN);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行登出

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void logout() {  // 登出
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_LOGOUT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行驗證appToken

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void validateAppToken() {  // 驗證appToken
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_VALIDATE_APP_TOKEN);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行新增產品分類

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void addProductLevel() {  // 新增產品分類
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_ADD_PRODUCT_LEVEL);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行修改產品分類

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void editProductLevel() {  // 修改產品分類
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_EDIT_PRODUCT_LEVEL);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行產品分類列表查詢

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryProductLevel() {  // 產品分類列表查詢
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_QUERY_PRODUCT_LEVEL);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行產品分類明細查詢

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryProductLevelDetails() {  // 產品分類明細查詢
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_QUERY_PRODUCT_LEVEL_DETAILS);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行產品分類關聯查詢

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryProductLevelRelation() {  // 產品分類關聯查詢
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_QUERY_PRODUCT_LEVEL_RELATION);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行產品分類關聯更新

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void updateProductLevelRelation() {  // 產品分類關聯更新
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_UPDATE_PRODUCT_LEVEL_RELATION);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行產品列表查詢

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryProduct() {  // 產品列表查詢
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_QUERY_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行產品明細查詢

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryProductDetails() {  // 產品明細查詢
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_QUERY_PRODUCT_DETAILS);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行訂單列表查詢

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryOrder() {  // 訂單列表查詢
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_QUERY_ORDER);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行訂單明細查詢

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void queryOrderDetails() {  // 訂單明細查詢
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_QUERY_ORDER_DETAILS);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行新增一般產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void addGeneralProduct() {  // 新增一般產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_ADD_GENERAL_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行修改一般產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void editGeneralProduct() {  // 修改一般產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_EDIT_GENERAL_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行新增捐款產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void addDonationProduct() {  // 新增捐款產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_ADD_DONATION_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行修改捐款產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void editDonationProduct() {  // 修改捐款產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_EDIT_DONATION_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行新增一碼付產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void addQuickPayProduct() {  // 新增一碼付產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_ADD_QUICK_PAY_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行修改一碼付產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void editQuickPayProduct() {  // 修改一碼付產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_EDIT_QUICK_PAY_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行新增點燈產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void addLightProduct() {  // 新增點燈產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_ADD_LIGHT_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行修改點燈產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void editLightProduct() {  // 修改點燈產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_EDIT_LIGHT_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行新增超渡產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void addReleaseProduct() {  // 新增超渡產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_ADD_RELEASE_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行修改超渡產品

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private void editReleaseProduct() {  // 修改超渡產品
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setAppToken(getAppToken());

        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_EDIT_RELEASE_PRODUCT);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行一般交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private ActionDetails getGeneralTransactionActionDetails(Object appRequest) {
        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_SEND_GENERAL_TRANSACTION);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        return actionDetails;
    }

    private void sendCreditCardGeneralTransaction() {  // 信用卡交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CREDIT_CARD);

        ActionDetails actionDetails = getGeneralTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendOfflineGeneralTransaction() {  // 所有線下交易,掃碼收款
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_OFFLINE_ALL);

        ActionDetails actionDetails = getGeneralTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendScanQrCodeGeneralTransaction() {  // 產生QrCode,線上
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_LINE_PAY);  // LINE Pay線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_PI);  // Pi 拍錢包線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_JKO);  // 街口支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_WECHAT);  // 微信支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_ALIPAY);  // 支付寶線上

        ActionDetails actionDetails = getGeneralTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendCashGeneralTransaction() {  // 現金交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CASH);

        ActionDetails actionDetails = getGeneralTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行捐款交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private ActionDetails getDonationTransactionActionDetails(Object appRequest) {
        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_SEND_DONATION_TRANSACTION);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        return actionDetails;
    }

    private void sendCreditCardDonationTransaction() {  // 信用卡交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CREDIT_CARD);

        ActionDetails actionDetails = getDonationTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendOfflineDonationTransaction() {  // 所有線下交易,掃碼收款
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_OFFLINE_ALL);

        ActionDetails actionDetails = getDonationTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendScanQrCodeDonationTransaction() {  // 產生QrCode,線上
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_LINE_PAY);  // LINE Pay線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_PI);  // Pi 拍錢包線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_JKO);  // 街口支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_WECHAT);  // 微信支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_ALIPAY);  // 支付寶線上

        ActionDetails actionDetails = getDonationTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendCashDonationTransaction() {  // 現金交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CASH);

        ActionDetails actionDetails = getDonationTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行一碼付交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private ActionDetails getQuickPayTransactionActionDetails(Object appRequest) {
        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_SEND_QUICK_PAY_TRANSACTION);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        return actionDetails;
    }

    private void sendCreditCardQuickPayTransaction() {  // 信用卡交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CREDIT_CARD);

        ActionDetails actionDetails = getQuickPayTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendOfflineQuickPayTransaction() {  // 所有線下交易,掃碼收款
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_OFFLINE_ALL);

        ActionDetails actionDetails = getQuickPayTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendScanQrCodeQuickPayTransaction() {  // 產生QrCode,線上
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_LINE_PAY);  // LINE Pay線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_PI);  // Pi 拍錢包線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_JKO);  // 街口支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_WECHAT);  // 微信支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_ALIPAY);  // 支付寶線上

        ActionDetails actionDetails = getQuickPayTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendCashQuickPayTransaction() {  // 現金交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CASH);

        ActionDetails actionDetails = getQuickPayTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行點燈交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private ActionDetails getLightTransactionActionDetails(Object appRequest) {
        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_SEND_LIGHT_TRANSACTION);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        return actionDetails;
    }

    private void sendCreditCardLightTransaction() {  // 信用卡交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CREDIT_CARD);

        ActionDetails actionDetails = getLightTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendOfflineLightTransaction() {  // 所有線下交易,掃碼收款
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_OFFLINE_ALL);

        ActionDetails actionDetails = getLightTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendScanQrCodeLightTransaction() {  // 產生QrCode,線上
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_LINE_PAY);  // LINE Pay線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_PI);  // Pi 拍錢包線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_JKO);  // 街口支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_WECHAT);  // 微信支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_ALIPAY);  // 支付寶線上

        ActionDetails actionDetails = getLightTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendCashLightTransaction() {  // 現金交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CASH);

        ActionDetails actionDetails = getLightTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

進行超渡交易

...
import tw.com.mypay.common.ActionDetails;
import tw.com.mypay.common.Constant;
...

public class YourActivity extends AppCompatActivity {

    ...

    private ActionDetails getReleaseTransactionActionDetails(Object appRequest) {
        ActionDetails actionDetails = new ActionDetails();
        actionDetails.setAction(Constant.ACTION_39_BUY_SEND_RELEASE_TRANSACTION);
        actionDetails.setData(getAppRequestJsonString(appRequest));  // 取得app request的JSON string

        return actionDetails;
    }

    private void sendCreditCardReleaseTransaction() {  // 信用卡交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CREDIT_CARD);

        ActionDetails actionDetails = getReleaseTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendOfflineReleaseTransaction() {  // 所有線下交易,掃碼收款
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_OFFLINE_ALL);

        ActionDetails actionDetails = getReleaseTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendScanQrCodeReleaseTransaction() {  // 產生QrCode,線上
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_LINE_PAY);  // LINE Pay線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_PI);  // Pi 拍錢包線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_JKO);  // 街口支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_WECHAT);  // 微信支付線上
        //appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_ALIPAY);  // 支付寶線上

        ActionDetails actionDetails = getReleaseTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    private void sendCashReleaseTransaction() {  // 現金交易
        YourAppRequest appRequest = getAppRequest();  // 你的app request
        ...
        // TODO 設定appRequest的參數
        ...
        appRequest.setDesignatePayMode(Constant.BUY_39_PAY_MODE_ID_CASH);

        ActionDetails actionDetails = getReleaseTransactionActionDetails(appRequest);

        Intent intent = new Intent();
        intent.putExtra(Constant.INTENT_EXTRA_KEY_REQUEST_ACTION_DETAILS, actionDetails);
        intent.setClassName(PACKAGE_NAME, TARGET_ACTIVITY_NAME);
        this.startActivityForResult(intent, yourRequestCode);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if ((yourRequestCode == requestCode) && (data != null)) {
            ActionDetails actionDetails = data.getParcelableExtra(Constant.INTENT_EXTRA_KEY_RESPONSE_ACTION_DETAILS);
            YourAppResponse appResponse = (YourAppResponse) getAppResponse(actionDetails.getData());  // 轉換為你的app response

            ...
            // 處理actionDetails與appResponse的資料
            ...
        }
    }
}

藍牙呼叫MYPAY APP交易(APP v3.9.0)

使用ExternalActionDetails傳入所需的資料(須加密),再透過藍牙傳送到MYPAY APP。

注意︰

  • 串接方使用的裝置和安裝MYPAY APP的設備都必須支援藍牙功能。
  • 串接方使用的裝置需要先和安裝MYPAY APP的設備配對藍牙。
  • 登入MYPAY APP後,在藍牙傳輸設定頁面中確認藍牙串接ID,並加入串接方的程式中,接著開啟藍牙Server服務。
  • 請使用RFCOMM BluetoothSocket的連接方式,可參考(https://github.com/android/connectivity-samples)。
  • 之後再進行加密資料的傳送。

ExternalActionDetails說明

ExternalActionDetails為一個JSON Object的string,格式如下︰ "{ "storeUid": "", "action": "", "data": "" }"

項次 欄位 說明 型別 備註
1 storeUid 特店代號 string
2 action 加密後的動作 string 請參考ActionDetails說明中使用的action
3 data 加密後的資料 string 請參考ActionDetails說明中使用的appRequest

ExternalActionDetails中action與data的加密方式

private String encrypt(String input, byte[] key, byte[] iv) {
    byte[] data = aes(input.getBytes(UTF_8), key, iv);  // AES-256-CBC-PKCS7

    return base64(iv, data);  // 將IV放在加密資料前面(IV + data),再整個轉成Base64的字串
}

private void sendByBluetooth(Object appRequest) {
    String storeUid = getYourStoreUid();  // 你的特店代號
    String storeKey = getYourStoreKey();  // 你的特店金鑰

    String encryptedAction = encrypt(getAction(), storeKey.getBytes(), getRandomIv(16));
    String encryptedData = encrypt(getAppRequestJsonString(appRequest), storeKey.getBytes(), getRandomIv(16));

    ExternalActionDetails actionDetails = new ExternalActionDetails();
    actionDetails.setStoreUid(storeUid);
    actionDetails.setAction(encryptedAction);
    actionDetails.setData(encryptedData);

    String requestString = getJsonString(actionDetails);

    // 透過藍牙傳送給MYPAY APP
}

藍牙掃碼傳輸說明

必須先串接藍牙模式,再透過MYPAY APP -> 藍牙傳輸設定頁面 -> 掃碼,將掃描的資料透過藍牙傳輸到串接方的應用(無加密)。

注意︰

  • 串接方使用的裝置和安裝MYPAY APP的設備都必須支援藍牙功能。
  • 串接方使用的裝置需要先和安裝MYPAY APP的設備配對藍牙。
  • 登入MYPAY APP後,在藍牙傳輸設定頁面中確認藍牙串接ID,並加入串接方的程式中,接著開啟藍牙Server服務。
  • 請使用RFCOMM BluetoothSocket的連接方式,可參考(https://github.com/android/connectivity-samples)。 串接方應用需自行處理接收資料的流程。

瀏覽器呼叫MYPAY APP交易(APP v3.9.1)

使用ExternalActionDetails傳入所需的資料(須加密),再透過傳送Intent到MYPAY APP。

注意︰

  • 載入串接方Web程式的瀏覽器必須和安裝的MYPAY APP在同一台設備中。
  • 登入MYPAY APP後,之後再由串接方Web程式進行加密資料的傳送。

ExternalActionDetails說明

ExternalActionDetails為一個JSON Object的string,格式如下︰ "{ "storeUid": "", "action": "", "data": "" }"

項次 欄位 說明 型別 備註
1 storeUid 特店代號 string
2 action 加密後的動作 string 請參考ActionDetails說明中使用的action
3 data 加密後的資料 string 請參考ActionDetails說明中使用的appRequest

ExternalActionDetails中action與data的加密方式

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button id="send">Send</button>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
    <script>
        function encrypt(input, key, iv) {
            const bufferKey = CryptoJS.enc.Utf8.parse(key);
            const bufferIv = CryptoJS.enc.Utf8.parse(iv
                ? iv
                : CryptoJS.SHA256(
                `${key}${Date.now()}`
                    .split('')
                    .sort(() => Math.random() - 0.5)
                    .join()
                ).toString(CryptoJS.enc.Hex)
                .slice(0, 16)
            );

            const encrypted = CryptoJS.AES.encrypt(
                input,
                bufferKey,
                {
                    iv: bufferIv,
                    mode: CryptoJS.mode.CBC,
                    padding: CryptoJS.pad.Pkcs7
                }
            );

            return bufferIv
                .concat(CryptoJS.enc.Base64.parse(encrypted.toString()))
                .toString(CryptoJS.enc.Base64);
        }

        const sendButton = document.querySelector('#send');
        const packageName = 'target app packageName';
        const key = 'your store key';
        const action = 'your action';
        const appRequest = 'your app request';
        const iv = 'your iv';

        sendButton.addEventListener('click', sendToMyPayApp);

        function sendToMyPayApp() {
            const actionDetails = {
                "storeUid": "your store uid",
                "action": encrypt(action, key, iv),
                "data": encrypt(appRequest, key, iv)
            }

            const query = JSON.stringify(actionDetails);
            const intent = `intent://mypay?data=${encodeURIComponent(query)}:#Intent;scheme=mypay;action=android.intent.action.SEND;category=android.intent.category.DEFAULT;package=${packageName};end`;

            window.location.href = intent;
        }
    </script>
</body>
</html>

ActionDetails說明

項次 欄位 說明 型別 備註
1 version MyPayCommon Lib的版本號 string 當串接方送出時為串接方使用的Lib版本號,由MYPAY APP回應時為MYPAY APP目前使用的Lib版本號(為當前最新的版本),可用來比對版本差異
2 action 進行的動作 string 必要
3 data AppRequest或AppResponse的資料 string 必要,其內容值都必須為合法的JSON Object { ... },請參考以下對應的說明

串接方App在送出ActionDetails前可使用以下程式將所有參數印出,以確定送出之參數符合預期。 Log.d(TAG, "actionDetails: " + yourActionDetails);

做為AppRequest使用時

必須將你的AppRequest轉換為JSON Object的string

直接交易

進行交易的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 payModeId 交易模式代號︰
1=信用卡
10=支付寶線上
13=微信支付線上
15=LINE Pay線上
27=Pi 拍錢包線上
31=街口支付線上
98=所有線下交易
string 必要
3 itemList 商品列表 list 必要,請參考商品列表欄位說明
4 currency 交易幣別︰
TWD=新台幣
CNY=人民幣
string 必要
5 discount 折價 string 非必要,使用時必定為負數的值
6 shippingFee 運費 string 非必要
7 ip 呼叫端IP string 必要
8 customer 消費者資料 object 非必要,請參考消費者資料欄位說明
9 invoice 發票資料 object 非必要,請參考發票資料欄位說明
10 echo echo資料 object 非必要,請參考echo欄位說明
11 creditCardReceiptType 信用卡簽單類型︰
1=列印全部(商店存根&持卡人存根)
2=只印持卡人存根
string 當交易模式代號為1時必要,Lib 0.0.51
12 onePassEcho 一碼付echo string 一碼付App交易使用的echo,其內容值為的JSON Object { "storeUid": "...", "storeName": "...", "externalStoreUid": "...", "externalStoreName": "..." }
13 receiptType 收據類型︰
1=免用統一發票收據
2=農漁民收據
string Lib 0.2.3
14 isPrintOrderDetailsReceipt 是否列印交易明細 boolean
交易查詢的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
退款的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 key appResponse回傳對應該訂單的key string 必要
3 uid appResponse回傳對應該訂單的uid string 必要
4 invoiceState 若有開立電子發票,指定電子發票使用作廢或折讓︰
4=作廢或作廢重開
6=折讓
string 必要,注意:跨發票月份無法作廢
5 creditCardReceiptType 信用卡簽單類型︰
1=列印全部(商店存根&持卡人存根)
2=只印持卡人存根
string 非必要,當原始交易為信用卡交易時才有作用,Lib 0.0.51

TAP交易(只有MYPAY TAP APP支援)

進行TAP交易的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 currency 交易幣別︰
TWD=新台幣
CNY=人民幣
string 必要
3 sendReceiptInfo 傳送電子簽單需要的資訊 string 非必要,目前支援手機號碼與Email
4 itemList 商品列表 list 必要,請參考商品列表欄位說明
5 invoice 發票資料 object 非必要,請參考發票資料欄位說明

一卡通交易(Lib 0.2.0)

進行詢卡的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 其它動作Request的共同欄位 請參考其它動作Request共同欄位說明
2 type 詢卡類型︰
1=快速詢卡
2=離線詢卡
3=連線詢卡
int 詢卡類型為1時表示欲查詢該卡片是否為一卡通票卡,為2時表示欲查詢目前票卡的餘額,為3時表示欲查詢目前票卡的餘額與相關資料(通常在票卡查詢機使用)
3 orderId 訂單編號 string 當詢卡類型為3時必要,最大長度為30
進行交易的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 其它動作Request的共同欄位 請參考其它動作Request共同欄位說明
2 type 交易類型︰
1=扣值交易
2=取消扣值交易
3=現金加值交易
4=取消現金加值交易
5=退貨加值交易
int
3 amount 訂單總金額(每項商品之總價加總) string 必要
4 orderId 訂單編號 string 當交易類型為1、3、5時必要,且交易類型為5時,傳入的值必須與對應的扣值交易之orderId相同,最大長度為30
5 rrn 交易Response回傳的uid string 當交易類型為2、4、5時必要
6 itemList 商品列表 list 當交易類型為1時才有作用,請參考商品列表欄位說明
7 invoice 發票資料 object 當交易類型為1時才有作用,請參考發票資料欄位說明
進行結班的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 其它動作Request的共同欄位 請參考其它動作Request共同欄位說明

其它動作(Lib 0.1.5)

列印的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 titleType 發票標題類型︰
1=文字
2=圖片URL
string
3 title 發票標題資料 string 依發票標題類型決定資料的內容為標題文字或圖片網址
4 year 發票年 string
5 month 發票月 string
6 dateTime 發票時間 string
7 invoiceNo 發票號碼 string
8 sellerId 賣方統編 string
9 buyerId 買方統編 string
10 randomCode 隨機碼 string
11 middleBarcode 發票中間barcode string
12 leftQrCode 發票左邊Qr Code string
13 rightQrCode 發票右邊Qr Code string
14 taxType 發票稅率類型︰
1=應稅
2=零稅率
3=免稅
string
15 invoiceType 發票類型︰
1=正式發票
2=補印發票
string
16 itemList 商品列表 list 請參考商品列表欄位說明
17 logo 發票標題圖片的data byte array 發票標題類型為2才有作用
18 logoBase64 發票標題圖片的data (Base64編碼) string 發票標題類型為2且logo為null時才有作用,Lib 0.0.45
19 printMode 列印模式︰
1=發票加明細
2=發票
3=明細
4=重印簽單
String 4加入於Lib 0.0.50
20 businessEntity 公司名或商店名 String
21 businessDay 營業日 String
22 phone 電話 String
23 address 地址 String
24 key appResponse回傳對應該訂單的key string 當重印簽單時必要,Lib 0.0.50
25 uid appResponse回傳對應該訂單的uid string 當重印簽單時必要,Lib 0.0.50
26 creditCardReceiptType 信用卡簽單類型︰
1=列印全部(商店存根&持卡人存根)
2=只印持卡人存根
string 當重印簽單時必要,Lib 0.0.51
進行掃碼回傳的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 其它動作Request的共同欄位 請參考其它動作Request共同欄位說明
進行查詢合作夥伴折扣碼的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 其它動作Request的共同欄位 請參考其它動作Request共同欄位說明
2 storeName 交易特店名稱 string
3 partner 合作夥伴資料 object 請參考合作夥伴欄位說明
進行取得特店支援之支付方式的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 其它動作Request的共同欄位 請參考其它動作Request共同欄位說明
2 currency 交易幣別 string 必要
進行取得自行收款設定的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 其它動作Request的共同欄位 請參考其它動作Request共同欄位說明

MYPAY頁面(Lib 0.1.8)

進入金流訂單列表頁的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 MYPAY頁面Request的共同欄位 請參考MYPAY頁面Request共同欄位說明
進入點餐單列表頁的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 MYPAY頁面Request的共同欄位 請參考MYPAY頁面Request共同欄位說明
進入發票管理頁的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 MYPAY頁面Request的共同欄位 請參考MYPAY頁面Request共同欄位說明
進入收據管理頁的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 MYPAY頁面Request的共同欄位 請參考MYPAY頁面Request共同欄位說明
進入印表機設定頁的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 MYPAY頁面Request的共同欄位 請參考MYPAY頁面Request共同欄位說明
進入交易回傳設定頁的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 MYPAY頁面Request的共同欄位 請參考MYPAY頁面Request共同欄位說明
進入結班設定頁的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 MYPAY頁面Request的共同欄位 請參考MYPAY頁面Request共同欄位說明

39Buy交易(Lib 0.0.56)

進行登入的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
進行登出的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
進行驗證appToken的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
進行新增產品分類的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 level 分類層級 int 必要,由1往上加,請勿跳段,以免造成錯誤
4 zhTwName 分類繁體名稱 string 必要
5 status 啟用狀態︰
0=關閉
1=啟用
int
進行修改產品分類的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 uid appResponse回傳對應該分類的uid string 必要
4 level 分類層級 int 必要,由1往上加,請勿跳段,以免造成錯誤
5 zhTwName 分類繁體名稱 string 必要
6 status 啟用狀態︰
0=關閉
1=啟用
int
進行產品分類列表查詢的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 查詢共同欄位 39Buy查詢Request的共同欄位 請參考39Buy查詢Request共同欄位說明
4 status 啟用狀態︰
0=關閉
1=啟用
int
進行產品分類明細查詢的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 uid appResponse回傳對應該分類的uid string 必要
進行產品分類關聯查詢的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
進行產品分類關聯更新的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 relationalData 關聯資料,範例如下所示,id為該分類的uid,data為該分類底下對應的分類層級資料,依此例子來說︰uid=14為最上層,它下層為uid=15與uid=16,而uid=15下層又有uid=17、uid=18跟uid=19,接著uid=16下層又有uid=17跟uid=18 JSON Array string 必要
[
   {
      "id":"14",
      "data":[
         {
            "id":"15",
            "data":[
               {
                  "id":"17",
                  "data":[

                  ]
               },
               {
                  "id":"18",
                  "data":[

                  ]
               },
               {
                  "id":"19",
                  "data":[

                  ]
               }
            ]
         },
         {
            "id":"16",
            "data":[
               {
                  "id":"17",
                  "data":[

                  ]
               },
               {
                  "id":"18",
                  "data":[

                  ]
               }
            ]
         }
      ]
   }
]
進行產品列表查詢的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 查詢共同欄位 39Buy查詢Request的共同欄位 請參考39Buy查詢Request共同欄位說明
4 type 產品類型 int 必要,請參考39Buy訂單產品類型說明
5 productWitch 產品是否開放︰
0=否
1=是
2=不限制
int 預設2
進行產品明細查詢的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 uid 對應該產品的uid string 必要
進行訂單列表查詢的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 page 頁數 int 預設1
4 record 一頁多少筆資料 int 預設10
5 type 產品類型 int 預設0,請參考39Buy訂單產品類型說明
6 retCode 付款狀態 string 請參考39Buy付款狀態說明
7 refundRetCode 退款狀態 string 請參考39Buy退款狀態說明
8 orderDateStart 訂單日期-起,格式為yyyy-MM-dd HH:mm:ss string
9 orderDateEnd 訂單日期-迄,格式為yyyy-MM-dd HH:mm:ss string
10 payMode 付款方式 string 預設0,請參考付款方式說明
11 searchType 查詢類型︰
1=訂購人姓名
2=訂單編號
3=發票號碼
int
12 searchKeyword 依查詢類型的項目查找的關鍵字 string
進行訂單明細查詢的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 uid 對應該訂單的uid string 必要
進行新增一般產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 specData 產品副檔資料 list 必要,請參考39Buy產品規格欄位說明
進行修改一般產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 修改產品共同欄位 修改產品Request的共同欄位 請參考39Buy修改產品Request共同欄位說明
5 specData 產品副檔資料 list 必要,請參考39Buy產品規格欄位說明
進行新增捐款產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 specData 產品副檔資料 list 必要,請參考39Buy產品規格欄位說明
5 unknown 是否匿名捐款︰
0=否
1=是
int 預設0
6 donorInfoSwitch 捐款人資訊開關︰
0=否
1=開
int 預設0,非匿名捐款時,強制為1
進行修改捐款產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 修改產品共同欄位 修改產品Request的共同欄位 請參考39Buy修改產品Request共同欄位說明
5 specData 產品副檔資料 list 必要,請參考39Buy產品規格欄位說明
進行新增一碼付產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 specData 產品副檔資料 list 必要,請參考39Buy產品規格欄位說明
進行修改一碼付產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 修改產品共同欄位 修改產品Request的共同欄位 請參考39Buy修改產品Request共同欄位說明
5 specData 產品副檔資料 list 必要,請參考39Buy產品規格欄位說明
進行新增點燈產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 specData 產品副檔資料 list 必要,請參考39Buy產品規格欄位說明
進行修改點燈產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 修改產品共同欄位 修改產品Request的共同欄位 請參考39Buy修改產品Request共同欄位說明
5 specData 產品副檔資料 list 必要,請參考39Buy產品規格欄位說明
進行新增超渡產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 specData 超渡產品副檔資料 list 必要,請參考39Buy超渡產品規格欄位說明
進行修改超渡產品的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 新增修改產品共同欄位 新增修改產品Request的共同欄位 請參考39Buy新增修改產品Request共同欄位說明
4 修改產品共同欄位 修改產品Request的共同欄位 請參考39Buy修改產品Request共同欄位說明
5 specData 超渡產品副檔資料 list 必要,請參考39Buy超渡產品規格欄位說明
進行一般交易的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 交易共同欄位 交易Request的共同欄位 請參考39Buy交易Request共同欄位說明
4 items 購買的商品 list 必要,請參考39Buy交易產品欄位說明
進行捐款交易的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 交易共同欄位 交易Request的共同欄位 請參考39Buy交易Request共同欄位說明
4 items 購買的商品 object 必要,請參考39Buy交易產品欄位說明
5 donorAskReceipt 捐款人索取收據︰
0=不索取
1=索取
int 預設0
6 donorAskMode 捐款人索取方式︰
0=無
1=單筆
2=年度
int 預設0
7 donorIsNotificationTax 捐款人上傳國稅局︰
0=否
1=是
int 預設0
8 donorType 捐款人類型︰
0=無
1=個人
2=法人
int 預設0
9 donorId 捐款人編號(身分證字號/公司編號) string
10 donorName 捐款人名稱(捐款人/捐款公司)(加密) string
11 donorCountry 捐款人的收據國別 string
12 donorCity 捐款人的收據縣市 string
13 donorDistricts 捐款人的收據鄉鎮區 string
14 donorAddress 捐款人的收據地址 string
進行一碼付交易的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 交易共同欄位 交易Request的共同欄位 請參考39Buy交易Request共同欄位說明
4 items 購買的商品 list 必要,請參考39Buy交易產品欄位說明
進行點燈交易的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 慈善交易共同欄位 慈善交易Request的共同欄位 請參考39Buy慈善交易Request共同欄位說明
4 donateList 點燈名單列表 list 必要,請參考39Buy點燈名單欄位說明
進行超渡交易的AppRequest
項次 欄位 說明 型別 備註
1 共同欄位 Request的共同欄位 請參考Request共同欄位說明
2 appToken 當次登入取得的token string 必要
3 慈善交易共同欄位 慈善交易Request的共同欄位 請參考39Buy慈善交易Request共同欄位說明
4 ghostFestivalItem 超渡項目 string 必要
5 releaseUserName 超渡對像名稱 string 必要
6 releaseUserBirthdayType 超渡對象生日類型︰
1=國曆
2=農曆
int 預設1
7 releaseUserBirthday 超渡對象生日,格式為yyyy-MM-dd string 如果不知生日時間,請統一帶9999-99-99
8 releaseUserBirthdayTime 超渡對象生辰(00 ~ 23) string 如果不知生日期間,請統一帶99
9 releaseUserBirthdayLeap 超渡對象生日是否為閏月︰
0=否
1=是
int 預設0
10 releaseUserDieDayType 超渡對象歿日類型1︰
1=國曆
2=農曆
int 預設1
11 releaseUserDieDay 超渡對象歿日,格式為yyyy-MM-dd string 如果不知歿日時間,請統一帶9999-99-99
12 releaseUserDieDayTime 超渡對象歿日 string 如果不知歿日期間,請統一帶99
13 releaseUserDieDayLeap 超渡對象歿日是否為閏月︰
0=否
1=是
int
14 releaseUserZipCode 超渡對象郵遞區號 string 必要
15 releaseUserCountry 超渡對象牌(塔)國家 string 必要
16 releaseUserCity 超渡對象牌(塔)城市 string 必要
17 releaseUserDistrict 超渡對象牌(塔)區域 string 必要
18 releaseUserAddress 超渡對象牌(塔)地址 string 必要

做為AppResponse使用時

在串接方App的onActivityResult中,請使用自行定義的requestCode判斷為那一種AppRequest後再進行轉換,以避免非預期的錯誤。 必須將ActionDetails的data轉換成你的AppResponse。

直接交易

進行交易的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 uid 對應該訂單的uid string
4 key 對應該訂單的key string
5 finishTime 交易時間 string
6 cardNo 卡號 string
7 aCode 授權碼 string 為信用卡交易時才會有值
8 orderId 串接方訂單編號 string
9 userId 該消費者在特店中註冊帳號名稱 string
10 amount 交易金額 string
11 actualAmount 實際交易金額 string
12 currency 交易幣別 string
13 actualCurrency 實際交易幣別 string
14 pfn 付款類型 string 請參考付款類型說明
15 echo echo資料 object 請參考echo欄位說明
16 itemList 訂單商品項目 list 請參考商品列表欄位說明
17 invoice 對應該訂單的發票資訊 object 請參考訂單發票欄位說明
查詢交易的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 orderList 訂單列表 list 請參考訂單列表欄位說明
退款的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 uid 對應該訂單的uid string
4 key 對應該訂單的key string
5 finishTime 交易時間 string
6 cardNo 卡號 string
7 aCode 授權碼 string 為信用卡交易時才會有值
8 orderId 串接方訂單編號 string
9 userId 該消費者在特店中註冊帳號名稱 string
10 amount 交易金額 string
11 actualAmount 實際交易金額 string
12 currency 交易幣別 string
13 actualCurrency 實際交易幣別 string
14 pfn 付款類型 string 請參考付款類型說明
15 echo echo資料 object 請參考echo欄位說明
列印的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string

TAP交易(只有MYPAY TAP APP支援)

進行TAP交易的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 uid 對應該訂單的uid string
4 finishTime 交易時間 string
5 cardNo 卡號 string
6 aCode 授權碼 string
7 orderId 串接方訂單編號 string
8 userId 該消費者在特店中註冊帳號名稱 string
9 amount 交易金額 string
10 currency 交易幣別 string
11 pfn 付款類型 string 請參考付款類型說明
12 transactionId 用於查詢該交易的id string

一卡通交易(Lib 0.2.0)

進行詢卡的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 uid 唯一交易序號 string 當詢卡類型為3時才存在
4 finishTime 交易時間 string 當詢卡類型為3時才存在
5 cardNo 卡號 string 當詢卡類型為3時才存在
6 aCode 交易授權碼 string 當詢卡類型為3時才存在
7 orderId 串接方訂單編號 string 當詢卡類型為3時才存在
8 userId 該消費者在特店中註冊帳號名稱 string 當詢卡類型為3時才存在
9 amount 交易金額 string 當詢卡類型為3時才存在
10 currency 交易幣別 string 當詢卡類型為3時才存在
11 pfn 付款類型 string 當詢卡類型為3時才存在,請參考付款類型說明
進行交易的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 uid 唯一交易序號 string
4 finishTime 交易時間 string
5 cardNo 卡號 string
6 aCode 交易授權碼 string
7 orderId 串接方訂單編號 string
8 userId 該消費者在特店中註冊帳號名稱 string
9 amount 交易金額 string
10 currency 交易幣別 string
11 pfn 付款類型 string 請參考付款類型說明
進行結班的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 uid 對應該訂單的uid string
4 batchNumber 當次結班流水號 string
5 totalCounter 總交易筆數 string
6 totalAmount 總交易金額 string
7 queryCardCounter 連線詢卡交易筆數 string
8 queryCardAmount 連線詢卡交易金額加總 string
9 redeemCounter 扣值交易筆數 string
10 redeemAmount 扣值交易金額加總 string
11 cancelRedeemCounter 取消扣值交易筆數 string
12 cancelRedeemAmount 取消扣值交易金額加總 string
13 cancelReloadCounter 取消現金加值交易筆數 string
14 cancelReloadAmount 取消現金加值交易金額加總 string
15 autoReloadCounter 前台自動加值交易筆數 string
16 autoReloadAmount 前台自動加值交易金額加總 string
17 cashReloadCounter 現金加值交易筆數 string
18 cashReloadAmount 現金加值交易金額加總 string
19 refundCounter 退貨加值交易筆數 string
20 refundAmount 退貨加值交易金額加總 string
21 returnOverReloadCounter 溢扣反還加值交易筆數 string
22 returnOverReloadAmount 溢扣反還加值交易金額加總 string
23 balanceRecoveryCounter 票值回覆交易筆數 string
24 balanceRecoveryAmount 票值回覆交易金額加總 string
25 autoReloadOffCounter 關閉自動加值交易筆數 string
26 autoReloadOffAmount 關閉自動加值交易金額加總 string
27 autoReloadOnCounter 開啟自動加值交易筆數 string
28 autoReloadOnAmount 開啟自動加值交易金額加總 string
29 lockCardCounter 鎖卡交易筆數 string
30 lockCardAmount 鎖卡交易金額加總 string
31 changeCardCounter 改卡交易筆數 string
32 changeCardAmount 改卡交易金額加總 string
33 autoReloadBackendCounter 後台自動加值交易筆數 string
34 autoReloadBackendAmount 後台自動加值交易金額加總 string
35 nextBatchNumber 次筆結班流水號 string
36 nextTotalCounter 次筆結班總交易筆數 string
37 nextTotalAmount 次筆結班總交易金額 string
38 nextQueryCardCounter 次筆結班連線詢卡交易筆數 string
39 nextQueryCardAmount 次筆結班連線詢卡交易金額加總 string
40 nextRedeemCounter 次筆結班扣值交易筆數 string
41 nextRedeemAmount 次筆結班扣值交易金額加總 string
42 nextCancelRedeemCounter 次筆結班取消扣值交易筆數 string
43 nextCancelRedeemAmount 次筆結班取消扣值交易金額加總 string
44 nextCancelReloadCounter 次筆結班取消現金加值交易筆數 string
45 nextCancelReloadAmount 次筆結班取消現金加值交易金額加總 string
46 nextAutoReloadCounter 次筆結班前台自動加值交易筆數 string
47 nextAutoReloadAmount 次筆結班前台自動加值交易金額加總 string
48 nextCashReloadCounter 次筆結班現金加值交易筆數 string
49 nextCashReloadAmount 次筆結班現金加值交易金額加總 string
50 nextRefundCounter 次筆結班退貨加值交易筆數 string
51 nextRefundAmount 次筆結班退貨加值交易金額加總 string
52 nextReturnOverReloadCounter 次筆結班溢扣反還加值交易筆數 string
53 nextReturnOverReloadAmount 次筆結班溢扣反還加值交易金額加總 string
54 nextBalanceRecoveryCounter 次筆結班票值回覆交易筆數 string
55 nextBalanceRecoveryAmount 次筆結班票值回覆交易金額加總 string
56 nextAutoReloadOffCounter 次筆結班關閉自動加值交易筆數 string
57 nextAutoReloadOffAmount 次筆結班關閉自動加值交易金額加總 string
58 nextAutoReloadOnCounter 次筆結班開啟自動加值交易筆數 string
59 nextAutoReloadOnAmount 次筆結班開啟自動加值交易金額加總 string
60 nextLockCardCounter 次筆結班鎖卡交易筆數 string
61 nextLockCardAmount 次筆結班鎖卡交易金額加總 string
62 nextChangeCardCounter 次筆結班改卡交易筆數 string
63 nextChangeCardAmount 次筆結班改卡交易金額加總 string
64 nextAutoReloadBackendCounter 次筆結班後台自動加值交易筆數 string
65 nextAutoReloadBackendAmount 次筆結班後台自動加值交易金額加總 string

其它動作(Lib 0.1.5)

進行掃碼回傳的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 result 掃碼的結果 string
進行查詢合作夥伴折扣碼的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 result 查詢折扣碼的結果 string
進行取得特店支援之支付方式的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼 string 請參考回傳碼說明
2 msg 回傳訊息 string
3 payModeIdList 特店支援之支付方式列表 string list 請參考付款方式說明(對應付款類型),若值為-1,請直接忽略。請忽略此列表中包含的一卡通支付方式,而直接判斷設備支援之支付方式列表是否有包含一卡通
4 devicePayModeIdList 設備支援之支付方式列表 string list 請參考付款方式說明(對應付款類型),若值為-1,請直接忽略。若欲判斷是否支援一卡通,請判斷此列表是否包含一卡通的支付方式,有則表示有支援,反之則沒有支援

39Buy交易(Lib 0.0.56)

進行登入的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
3 storeUid 大特店或特約商店uid string
4 userName 登入者名稱 string
5 userLoginId 登入者ID string
6 companyName 公司名稱 string
7 companyNickName 公司簡稱 string
8 appToken 當次登入取得的token string
9 permissionList 功能權限列表 string array
10 deviceId 設備ID string
進行登出的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
進行驗證appToken的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
進行新增產品分類的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼︰
A0000=新增成功
A0001=資料已存在
A9999=新增異常
string
2 msg 回傳訊息 string
進行修改產品分類的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼︰
E0000=修改成功
E0001=資料已存在
E9999=修改異常
string
2 msg 回傳訊息 string
進行產品分類列表查詢的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
3 count 資料筆數 int
4 data 產品分類列表 list 請參考39Buy產品分類列表欄位說明
進行產品分類明細查詢的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
3 uid 分類uid string
4 zhTwName 分類繁中名稱 string
5 level 層級 int
6 status 是否啟用︰
0=否
1=是
int
進行產品分類關聯查詢的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
3 data 產品分類關聯列表 list 請參考39Buy產品分類關聯欄位說明
進行產品分類關聯更新的AppResponse
項次 欄位 說明 型別 備註
1 code 回傳碼︰
A0000=新增成功
A9999=新增異常
string
2 msg 回傳訊息 string
進行產品列表查詢的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
3 totalPage 總頁數 int
4 nowPage 目前頁數 int
5 data 產品列表 list 請參考39Buy產品欄位說明
進行產品明細查詢的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
3 uid 產品uid string
4 storeUid 特店代號 string
5 productNo 產品編號 string
6 productType 產品規格︰
1=單規格
2=雙規格
3=三規格
99=無規格
int
7 type 產品類型 int 請參考39Buy訂單產品類型說明
8 productClass 所屬上層分類的uid string array
9 zhTwName 產品名稱(繁中) string
10 enUsName 產品名稱(英文) string
11 zhCnName 產品名稱(簡中) string
12 jaName 產品名稱(日文) string
13 productSwitch 產品狀態︰
0=未開放購買
1=開放購買
2=草稿
3=結案
int
14 startOpenDate 開放產品可購買開始時間 string
15 endOpenDate 開放產品可購買結束時間 string
16 payMode 付款方式 string 請參考付款方式說明
17 textPeriod 定期定額周期選項 string
18 regularTotal 定期定額指定期數 string
19 zhTwProductDesc 產品簡短說明(繁中) string
20 enUsProductDesc 產品簡短說明(英文) string
21 zhCnProductDesc 產品簡短說明(簡中) string
22 zhTwPageDesc 頁面說明(繁中) string
23 enUsPageDesc 頁面說明(英文) string
24 zhCnPageDesc 頁面說明(簡中) string
25 shippingFeeTaiwan 台灣地區的運費 string
26 freeShippingTaiwan 台灣地區免費運金額門檻 string
27 shippingFeeIsland 離島地區的運費 string
28 freeShippingIsland 離島地區免費運金額門檻 string
29 shippingFeeChina 大陸地區的運費 string
30 freeShippingChina 大陸地區免費運金額門檻 string
31 shippingFeeOversea 海外地區的運費 string
32 freeShippingOversea 海外地區免費運金額門檻 string
33 buyerInfo 購買該產品時買家的必要欄位︰
name=姓名
phone=電話
address=地址
mail=e-mail
query_code=查詢碼
single_number=自取碼
memo=備註
payer_id=身份證字號
string
34 pickupType 取貨方式︰
0=無須取貨
1=線上下單宅配送貨
2=線上下單自取
3=門市下單宅配
4=門市下單自取
string
35 price 定價 string
36 specialPrice 售價 string
37 isReciprocal 是否開放倒數計數︰
0=否
1=是
int
38 quickPaySystem 一碼付系統預設︰
0=否
1=是
int
39 donorInfoSwitch 捐款人資訊開關︰
0=否
1=開
int
40 templateUid 對應感謝狀樣板編號 int
41 shortUrl 短網址 string
42 creator 建立者uid string
43 updater 修改者uid string
44 createdAt 產品建立時間,格式為yyyy-MM-dd HH:mm:ss string
45 updatedAt 產品修改時間,格式為yyyy-MM-dd HH:mm:ss string
46 specData 產品明細規格 list 請參考39Buy產品明細規格欄位說明
47 imgData 產品圖片 list 請參考39Buy產品明細圖片欄位說明
進行訂單列表查詢的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
3 total 總金額 string
4 totalPage 總頁數 int
5 nowPage 目前頁數 int
6 data 訂單列表 list 請參考39Buy訂單欄位說明
進行訂單明細查詢的AppResponse
項次 欄位 說明 型別 備註
1 code 39Buy回傳碼 string 請參考39Buy回傳碼說明
2 msg 回傳訊息 string
3 uid 訂單uid string
4 companyUid 大特店代碼 string
5 launchUid 發動方商務代號 string
6 launchLayer 發動方層級︰
1=agent
3=store
int
7 storeUid 訂單所屬特約商 string
8 storeOrderId 廠商自訂訂單編號 string
9 orderDate 訂單日期 string
10 shippingFee 運費 string
11 orderTypeUid 訂單產品類型 int 請參考39Buy訂單產品類型說明
12 payModeUid 付款方式 int
13 payerRealName 付款人真實姓名(加密) string
14 payerIdType 身分證類型︰
1=身分證
2=統一證號
3=護照號碼
int 付款人為本國人為1,外國人為2或3
15 payerId 付款人身分證/統一證號/護照號碼 string
16 payerBirthday 付款人生日,格式為yyyy-MM-dd string
17 payerPhoneCode 付款人手機國碼 string
18 payerPhone 付款人手機 string
19 payerMail 付款人信箱 string
20 payerZipcode 付款人郵遞區號 string
21 payerCountry 付款人國籍 string
22 payerCity 付款人居住城市 string
23 payerDistrict 付款人居住區域 string
24 payerAddress 付款人居住地址 string
25 consigneeRealName 收件人真實姓名 string
26 consigneeBirthday 收件人生日,格式為yyyy-MM-dd string
27 consigneePhoneCode 收件人手機國碼 string
28 consigneePhone 收件人手機 string
29 consigneeMail 收件人信箱 string
30 consigneeZipcode 收件人郵遞區號 string
31 consigneeCountry 收件人國籍 string
32 consigneeCity 收件人居住城市 string
33 consigneeDistrict 收件人居住區域 string
34 consigneeAddress 收件人居住地址 string
35 letterOfThanksMail 感謝信收件人mail string
36 letterOfThanksName 感謝信收件人姓名 string
37 payPrice 消費金額 string
38 refundPayPrice 退款金額 string
39 currencyCls 幣別記錄 string
40 couponUid 折扣卷對應uid string
41 cardNo 遮碼卡號 string
42 aCode 授權碼 string
43 transactionMode 交易服務類型︰
0=尚未進行閘道交易
1=代收代付
2=特店模式
string
44 supplierName 交易之金融服務商 string
45 supplierCode 交易之金融服務商代碼 string
46 discount 折扣金額 string
47 redeem 紅利兌換比例 string
48 retCode 付款狀態 string 請參考39Buy付款狀態說明
49 refundRetCode 退款狀態 string 請參考39Buy退款狀態說明
50 loanData 貸款資料 string
51 pickupType 取貨方式︰
0=無須取貨
1=線上下單宅配送貨
2=線上下單自取
3=門市下單宅配
4=門市下單自取
int
52 pickupAvailable 貨物狀態︰
0=狀態
1=已出貨(ALL)
2=可取貨(店自取)
3=已取貨(店自取)
4=已送達(送貨)
int
53 singleNumber 貨運單號或取貨代碼 string
54 memo 買家留言 string
55 treatmentMemo 訂單處理註記 string
56 extraEcho 使用api送來echo值的記錄區 string
57 sysEcho 內部系統紀錄echo string
58-62 echo0 ~ ech4 自訂紀錄 string
63 queryCode 訂單查詢碼 string
64 taxiCarNumber 計程車車輛編號 string
65 taxiLicensePlateNumber 計程車車牌號碼 string
66 feeType 手續費類型︰
1=單筆金額
2=單筆比例
3=比例+金額
4=比例+上限
int
67 feePrice 手續費金額記錄所在 string
68 refundFeePrice 退貨手續費金額紀錄 string
69 regular 定期定額付費期數單位:
W=每週扣款一次
F=雙週扣款一次
M=每月扣款一次
S=每季扣款一次
H=每半年扣款一次
A=每年扣款一次
string
70 regularTotal 定期定額或分期付款、無卡分期總期數 int
71 regularFirstChargeDate 定期定額或分期付款開始扣款日,格式為yyyy-MM-dd string
72 importOrderType 匯入訂單的種類︰
1=39buy系統自建的訂單
2=從他處匯入的捐款訂單
int
73 noneAdvanceCode 無商品模式代碼 string
74 saleId 歸屬於業務訂單 對應users->uid string
75 invoice 發票回應資料 int, string 請參考39Buy發票回應資料欄位說明
76 notificationType 透過內部websocket (外部廠商使用此欄位為無效),僅限裝置交易通知,需搭配設備代號︰
0=不通知
1=只通知交易
2=只通知發票
3=都通知
int
77 deviceNo 設備代號 string
78 deviceName 設備名稱 string
79 storeAddress 發票明細地址 string
80 storeName 發票明細名稱 string
81 storePhone 發票明細服務電話 string
82 confirmShow 卡機是否顯示訂單明細,給卡機操作者確認資料︰
0=不顯示
1=顯示
int
83 confirmMessage 卡機上顯示的文字 string
84 posConfirmStatus 0=未回應
1=已同意
2=不同意
int
85 posConfirmDate POS操作端回應時間 string
86 foodPaperTitle 點餐單標題 string
87 fontSize 點餐系統用-字型大小︰
0=無設定
1=26
2=28
3=30
int
88 showTitleItem 要顯示的項目︰
1=桌號
2=人數
3=日期
4=時間
string
89 showMenuTitle 要顯示的餐點標題︰
1=菜名
2=量
3=口味
4=價錢
string
90 tableNumber 點餐系統用-桌號 string
91 people 點餐系統用-人數 string
92 distribute 一筆訂單,多項商品,多項收件人紀錄,適用商品類型:17 string
93 appropriationDate 代收付撥款日期 string
94 createdAt 建立時間 string
95 updatedAt 修改時間 string
96 details 訂單產品細項列表 list 請參考39Buy訂單產品細項欄位說明
97 records 訂單付款資料列表 list 請參考39Buy訂單付款資料欄位說明
進行新增一般產品的AppResponse
項次 欄位 說明 型別 備註
1 code 新增產品回傳碼 string 請參考39Buy新增產品回傳碼說明
2 msg 回傳訊息 string
進行修改一般產品的AppResponse
項次 欄位 說明 型別 備註
1 code 修改產品回傳碼 string 請參考39Buy修改產品回傳碼說明
2 msg 回傳訊息 string
進行新增捐款產品的AppResponse
項次 欄位 說明 型別 備註
1 code 新增產品回傳碼 string 請參考39Buy新增產品回傳碼說明
2 msg 回傳訊息 string
進行修改捐款產品的AppResponse
項次 欄位 說明 型別 備註
1 code 修改產品回傳碼 string 請參考39Buy修改產品回傳碼說明
2 msg 回傳訊息 string
進行新增一碼付產品的AppResponse
項次 欄位 說明 型別 備註
1 code 新增產品回傳碼 string 請參考39Buy新增產品回傳碼說明
2 msg 回傳訊息 string
進行修改一碼付產品的AppResponse
項次 欄位 說明 型別 備註
1 code 修改產品回傳碼 string 請參考39Buy修改產品回傳碼說明
2 msg 回傳訊息 string
進行新增點燈產品的AppResponse
項次 欄位 說明 型別 備註
1 code 新增產品回傳碼 string 請參考39Buy新增產品回傳碼說明
2 msg 回傳訊息 string
進行修改點燈產品的AppResponse
項次 欄位 說明 型別 備註
1 code 修改產品回傳碼 string 請參考39Buy修改產品回傳碼說明
2 msg 回傳訊息 string
進行新增超渡產品的AppResponse
項次 欄位 說明 型別 備註
1 code 新增產品回傳碼 string 請參考39Buy新增產品回傳碼說明
2 msg 回傳訊息 string
進行修改超渡產品的AppResponse
項次 欄位 說明 型別 備註
1 code 修改產品回傳碼 string 請參考39Buy修改產品回傳碼說明
2 msg 回傳訊息 string
進行一般交易的AppResponse
項次 欄位 說明 型別 備註
1 code 交易回傳碼 string 請參考39Buy交易回傳碼說明
2 msg 回傳訊息 string
3 feeMoney 運費 string
4 errMsg 參數異常訊息 string list
5 productError 產品資料異常訊息 list 請參考39Buy產品資料異常訊息欄位說明
6 orderResult 訂單資料 object 請參考39Buy訂單資料欄位說明
進行捐款交易的AppResponse
項次 欄位 說明 型別 備註
1 code 交易回傳碼 string 請參考39Buy交易回傳碼說明
2 msg 回傳訊息 string
3 feeMoney 運費 string
4 errMsg 參數異常訊息 string list
5 productError 產品資料異常訊息 list 請參考39Buy產品資料異常訊息欄位說明
6 orderResult 訂單資料 object 請參考39Buy訂單資料欄位說明
進行一碼付交易的AppResponse
項次 欄位 說明 型別 備註
1 code 交易回傳碼 string 請參考39Buy交易回傳碼說明
2 msg 回傳訊息 string
3 feeMoney 運費 string
4 errMsg 參數異常訊息 string list
5 productError 產品資料異常訊息 list 請參考39Buy產品資料異常訊息欄位說明
6 orderResult 訂單資料 object 請參考39Buy訂單資料欄位說明
進行點燈交易的AppResponse
項次 欄位 說明 型別 備註
1 code 交易回傳碼 string 請參考39Buy交易回傳碼說明
2 msg 回傳訊息 string
3 feeMoney 運費 string
4 errMsg 參數異常訊息 string list
5 productError 產品資料異常訊息 list 請參考39Buy產品資料異常訊息欄位說明
6 orderResult 訂單資料 object 請參考39Buy訂單資料欄位說明
進行超渡交易的AppResponse
項次 欄位 說明 型別 備註
1 code 交易回傳碼 string 請參考39Buy交易回傳碼說明
2 msg 回傳訊息 string
3 feeMoney 運費 string
4 errMsg 參數異常訊息 string list
5 productError 產品資料異常訊息 list 請參考39Buy產品資料異常訊息欄位說明
6 orderResult 訂單資料 object 請參考39Buy訂單資料欄位說明

資料欄位說明

Request共同欄位說明

項次 欄位 說明 型別 備註
1 storeUid 特約商店商務代號 string 必要
2 orderId 訂單編號 string 交易必要,最大長度為30
3 amount 訂單總金額 = 每項商品之總價加總 + 折價 + 運費(如為定期定額交易,此為每一期的應扣金額) string 交易必要,並依使用之交易幣別決定支援的小數位數︰
TWD=新台幣(不支援小數)
CNY=人民幣(小數2位)
4 userId 該消費者在特店中註冊帳號名稱。黑名單機制︰被列入黑名單,則無法進行交易。風險管理機制︰特店模式中,可設定該帳號的交易次數、單筆金額與交易上限;代收付模式,則無法自行設定。 string 必要
5 deviceName 設備名稱 string 目前未使用,可為null
6 mode 呼叫MYPAY APP的模式︰
1=Cross App模式
2=API模式
string 預設為1,請勿修改此設定,否則將造成非預期的行為

其它動作Request共同欄位說明

項次 欄位 說明 型別 備註
1 storeUid 特約商店商務代號 string 必要
2 userId 該消費者在特店中註冊帳號名稱。黑名單機制︰被列入黑名單,則無法進行交易。風險管理機制︰特店模式中,可設定該帳號的交易次數、單筆金額與交易上限;代收付模式,則無法自行設定。 string 必要

MYPAY頁面Request共同欄位說明

項次 欄位 說明 型別 備註
1 storeUid 特約商店商務代號 string 必要
2 userId 該消費者在特店中註冊帳號名稱。黑名單機制︰被列入黑名單,則無法進行交易。風險管理機制︰特店模式中,可設定該帳號的交易次數、單筆金額與交易上限;代收付模式,則無法自行設定。 string 必要

商品列表欄位說明

項次 欄位 說明 型別 備註
1 id 商品編號 string
2 name 商品名稱 string 名稱中不能包含冒號(:)
3 price 商品單價 string 若為折扣項目須為負值
4 quantity 商品數量 string
5 total 商品總價(總價 = 單價 x 數量) string 若為折扣項目須為負值
6 isPrintOut 是否可以在明細上印出 boolean Lib 0.0.34

消費者資料欄位說明

項次 欄位 說明 型別 備註
1 name 姓名 string
2 realName 真實姓名 string
3 address 地址 string
4 snType 身分類型︰
1=身分證
2=統一證號
3=護照號碼
string 消費者為本國人為1,外國人為2或3
5 sn 身分證/統一證號/護照號碼 string
6 phone 家用電話 string
7 callingCode 行動電話國碼 string 預設為886
8 mobile 行動電話 string
9 email E-Mail string
10 birthday 生日 string
11 zipCode 郵遞區號 string
12 country 國籍 string
13 city 居住城市 string
14 district 居住區域 string

發票資料欄位說明

項次 欄位 說明 型別 備註
1 rateType 稅率類型︰
1=應稅
2=零稅率
3=免稅
int
2 inputType 類型︰
1=雲端發票
2=發票捐贈
3=實體發票
4=外部發票
5=免用統一發票收據
6=農漁民收據
string 類型4、5、6只有39Buy支援
3 cloudType 雲端發票類型︰
2=手機條碼
3=自然人憑證條碼
4=以E-Mail寄送
string 類型為1才有作用
4 mobileCode 手機條碼 string 雲端發票類型為2才有作用
5 taxId 統一編號 string 雲端發票類型為2才有作用
6 naturalPerson 自然人憑證條碼(格式請自行驗證) string 雲端發票類型為3才有作用
7 mPostZone E-Mail紙本寄送郵遞區號 string 雲端發票類型為4才有作用
8 mAddress E-Mail紙本寄送住址 string 雲端發票類型為4才有作用
9 loveCode 愛心碼(格式請自行驗證) string 類型為2才有作用
10 b2bTitle 發票抬頭 string 類型為3才有作用
11 b2bId 統一編號(格式請自行驗證) string 類型為3才有作用
12 b2bPostZone 郵遞區號 string 類型為3才有作用
13 b2bAddress 地址 string 類型為3才有作用
14 issuerState 發票是否開立狀態︰
0=不開立電子發票
1=開立電子發票
2=依系統設定
int 預設2
15 printMode 列印類型模式︰
0=不列印
2=發票
string 預設0

echo欄位說明

項次 欄位 說明 型別 備註
1 value0 資料0 string
2 value1 資料1 string
3 value2 資料2 string
4 value3 資料3 string
5 value4 資料4 string

訂單列表欄位說明

項次 欄位 說明 型別 備註
1 id 訂單編號 string
2 uid 對應該訂單的uid string
3 finishTime 交易時間 string
4 pfn 付款類型 string 請參考付款類型說明
5 amount 交易金額 string
6 actualAmount 實際交易金額 string
7 currency 交易幣別 string
8 actualCurrency 實際交易幣別 string
9 invoiceNo 發票號碼 string 棄用
10 key 對應該訂單的key string
11 cardNo 卡號 string
12 refundUidList 對應該訂單的所有退款uid string list
13 status 對應該訂單的交易狀態 string 請參考回傳碼說明
14 statusMsg 對應該訂單的交易狀態訊息 string
15 itemList 訂單商品項目 list 請參考商品列表欄位說明
16 invoice 對應該訂單的發票資訊 object 請參考訂單發票欄位說明

訂單發票欄位說明

項次 欄位 說明 型別 備註
1 state 發票開立狀態︰
0=不處理或已無效
1=等候處理中
2=發票開立成功
3=發票開立失敗(系統或特約商店發票相關設定不正確)
4=作癈
5=發票開立失敗(系統發生錯誤)
6=折讓
int
2 titleType 發票標題類型︰
1=文字
2=圖片URL
int
3 rateType 稅率類型︰
1=應稅
2=零稅率
3=免稅
int
4 inputType 類型︰
0=未使用電子發票開立
1=雲端發票
2=發票捐贈
3=實體發票
int
5 cloudType 雲端發票類型︰
0=未使用
2=手機條碼
3=自然人憑證條碼
4=以E-Mail寄送
int
6 date 發票開立日期 string
7 wordTrack 發票字軌 string
8 number 發票號碼 string
9 randomCode 隨機碼 string
10 sellerId 賣方統編 string
11 buyerId 買方統編 string
12 leftQrCode 發票左邊Qr Code string
13 middleBarcode 發票中間barcode string
14 rightQrCode 發票右邊Qr Code string
15 title 發票標題資料 string 依發票標題類型決定資料的內容為標題文字或圖片
16 amount 電子發票銷售總額 string
17 salesAmount 電子發票銷售額 string
18 taxAmount 電子發票稅額 string
19 orderDetail 電子發票全部產品明細 string JSON格式
20 mobileCode 手機條碼 string
21 taxId 統一編號 string
22 naturalPerson 自然人憑證條碼 string
23 mPostZone E-Mail紙本寄送郵遞區號 string
24 mAddress E-Mail紙本寄送住址 string
25 loveCode 愛心碼 string
26 b2bTitle 發票抬頭 string
27 b2bId 統一編號 string
28 b2bPostZone 郵遞區號 string
29 b2bAddress 地址 string

合作夥伴欄位說明

項次 欄位 說明 型別 備註
1 couponCode 折扣碼 string

回傳碼說明

回傳碼 說明 備註
金流回傳碼 金流交易的回傳碼 請參考金流回傳碼說明
App回傳碼 MYPAY APP處理錯誤的回傳碼 請參考App回傳碼說明
Tap回傳碼 TAP交易的回傳碼 請參考Tap回傳碼說明
一卡通回傳碼 一卡通交易的回傳碼 請參考一卡通回傳碼說明

金流回傳碼說明

回傳碼 說明 備註
100 資料錯誤,API收到資料,但是格式或資料錯誤
200 資料正確,API收到正確資料,會接續下一步交易
220 取消成功,API申請取消,取消訂單狀態為取消成功
230 退款成功,API申請退款,申請退款成功時狀態
250 付款成功,此次API交易,消費者付款成功
260 交易成功 - 尚未付款完成,超商代碼繳費-請等候消費者繳費入帳完成付款或消費者放棄交易,API會再傳送一次結果:
250:代表消費者付款成功,此為最終結果
380:代表消費者沒有在時限內去繳費,逾期未去繳費,視同交易失敗,此為最終結果
265 訂單綁定,表示訂單編號生效,進入貸款頁面,但尚未註冊,最後會在回傳狀態:
A0002:消費者放棄該筆交易,該筆交易視同交易失敗,為最終結果
275:無卡分期-請等候審查通過
270 交易成功 - 尚未付款完成,虛擬帳號-請等候消費者繳費入帳完成付款或消費者放棄交易,API會再傳送一次結果:
250:代表消費者付款成功,此為最終結果
380:代表消費者沒有在時限內去繳費,逾期未去繳費,視同交易失敗,此為最終結果
275 交易成功 - 待審核(核貸中),無卡分期-請等候審查通過核貸或婉拒,API會再傳送一次結果:
250:代表該筆訂單已核貸,此為最終結果
380:代表該筆訂單沒有在時限內完成審核,視同交易失敗,此為最終結果
280 交易成功 - 尚未付款完成,儲值/WEBATM-線上待付款,等待狀態,等到使用者線上完成交易後API會再傳送一次結果:
250:代表消費者付款成功,此為最終結果
300:代表消費者付款失敗
282 訂單成立待審核,後支付,等待狀態,等到此筆訂單審核通過
284 訂單成立待出貨,後支付,等待狀態,特約商店可以進行出貨
290 交易成功 - 但資訊不符,包含金額不符、已逾期...等,該類型交易請特別注意
300 交易失敗,金流服務商回傳交易失敗或該筆交易超過風險控管限制規則
380 逾期交易,超商代碼或虛擬帳號交易,超過系統設定繳費期限,若經API查詢驗證後,有機會再變更狀態:
290:交易成功,但資訊不符,原因有可能是服務商的參數規則漏洞或是系統時間差異造成
400 系統錯誤訊息,若API或上游服務商系統異常時
600 結帳完成,API視為付款完成,此狀態為上游服務商確認訂單後的狀態,表示該筆訂單會撥款,透過MYPAY主動查詢或每日對帳機制,操作訂單功能內發動查詢功能
A0001 交易待確認,API與金流服務商發生連線異常,待查詢後確認結果,會主動再次回傳交易結果:
250:代表消費者確實付款完成
600:結帳完成
300:金流服務商回傳交易失敗或超過風險控管限制規則交易
A0002 放棄交易,畫面導向API後,消費者即放棄該筆交易,該筆交易視同交易失敗,為最終結果
B200 執行成功,API處理成功執行
B500 執行失敗,API處理時,資料異常不予以處理

App回傳碼說明

回傳碼 說明 備註
200 App執行動作成功,如掃碼成功與列印成功等
201 切換使用者成功,表示此次的登入為切換使用者的情況,且登入成功
9999 非預期的錯誤,為非正常流程產生之錯誤,如讀卡失敗或程式處理不當,訊息通常為Exception的Message 若收到此錯誤時,請協助回報使用流程與是否能重現該錯誤
9999_x MYPAY APP錯誤︰
9999_1:使用者取消動作
9999_2:交易成功,列印失敗
9999_3:退款成功,列印失敗
9999_4:交易中斷
9999_5:查詢的交易不存在
9999_6:取消登入(39Buy)
9999_7:掃碼錯誤
9999_8:取消感應票卡
9999_9:尚未設定合作夥伴的URL
9999_10:請先安裝xxx APP
9999_11:交易成功,發票配號失敗
9999_12:一碼付切換使用者
此部分的錯誤請依對應的情況進行處理︰
9999_1:此動作為使用者自行決定的動作,即手動取消,如果已發動交易,MYPAY APP將會在背景進行退款動作,以避免同一訂單進行多次交易的情況發生
9999_2:表示交易成功,只需重新列印缺少的單據,無須重新交易
9999_3:表示退款成功,只需重新列印缺少的單據,無須重新交易
9999_4:MYPAY APP將會在背景進行退款動作,以避免同一訂單進行多次交易的情況發生

Tap回傳碼說明

回傳碼 說明 備註
0 TransactionSuccessful:

Sale/Refund
100: Transaction approved

Get Transaction Status
10x: 請參考備註
Event code indicates transaction has been carried out successfully and the transaction cycle has been completed as well.

10x
100: Transaction approved
101: Transaction reversed
102: Transaction voided
103: Transaction pending signature
104: Transaction settled
105: Transaction pending TC
106: Transcation refunded
7004 TransactionDeclined Event code indicates the transaction is declined by kernel.
7005 TransactionFailed:

General:
1000: Network Unavailable
1001: Request Timeout
-1004: Service Unavailable
2002: Session is expired
10001: Service Unavailable

Refresh Token:
3011: Login Account Suspended
14014: Invalid SSO Token

Sale/Refund
7056: Transaction Failed
7059: Transaction Pin Not Supported
9012: No Application Supported
7004: Transaction Declined
7501: GPO failed
7020: Transaction Online Failed
7502: Card locked
5111: You have exceeded your maximum monthly transaction limit. Please contact our support hotline
2xx: 請參考備註
5112: You have exceeded your maximum per transaction limit. Please contact our support hotline
5120: Unable to process payment. Please try again. If the problem persists, kindly contact our merchant hotline.
8090: Host error. Please contact our support hotline
8091: Service is unavailable. Please try again later
8092: Service is unavailable. Please try again later
8093: Batch upload has failed. Please contact our support hotline
9002: Card Expired/Not Effective
9003: Card not yet effective.
9004: Unable to perform transaction

Void
3012: You do not have the required permissions to perform void payment or credit settlement functions

Send Receipt
5113: Invalid mobile phone number
5114: Invalid email address
5115: Email/SMS service is currently not available. Please contact our support hotline.

Get Transaction Status
10001: Service is currently unavailable. Please try again later.
Event code indicates the kernel has failed to process the transaction.

2xx
201: Refer to card issuer
202: Refer to card issuer's special conditions
203: Invalid merchant or service provider
204: Pickup Card
205: Do not honor
206: Error
207: Pickup Card, special condition (other than lost/stolen card)
212: Invalid transaction
213: Invalid amount
214: Invalid card reader
221: No action taken
225: Unable to locate record on file
228: File is temporarily unavailable
241: Pickup card (lost card)
243: Pickup card (stolen card)
251: Insufficient funds
254: Expired card
255: Incorrect PIN
257: Transaction not permitted to cardholder
258: Transaction not permitted to terminal
261: Activity amount limit exceeded
262: Restricted card
263: Security violation
265: Activity count limit exceeded
276: Unable to locate previous message
277: Reconcile error (or host text if sent)
280: Invalid date
291: Issuer or Switch in-operative
292: Destination cannot be found for routing
293: Transaction cannot be completed; violation of law
294: Duplicate transmission
295: Indication for Reconcile Error on Settlement Request, Batch upload needed
296: System malfunction
299: Transaction declined
7006 TransactionNoAppError Event code indicates the card tapped does not have any schemes in it.
7007 TransactionFailedAllowFallback Event code indicates the transaction has failed but allowing fallback mechanism. Please handle this error the same way as how TransactionFailed is handled.
7008 TransactionCardExpired Event code indicates the transaction has failed due to the card tapped has expired.
7020 TransactionOnlineFailed Event code indicates the transaction has failed due to online host rejection.
7024 TransactionCancel Event code indicates the transaction has been cancelled intentionally by the user.
7028 TransactionTimeout Event code indicates the transaction has failed due to timer that starts counting since transaction start has elapsed.
7054 TransactionRequireCDCVM Event code indicates that CDCVM is required, advise customer to see phone for instructions.
7056 TransactionTryAgain Event code indicates the Fasstap MPOS SDK has failed to communicate with the card tapped. This is most likely happened when the card has moved away in the midst of transaction processing.
7059 TransactionPinNotSupported Event code indicates the transaction has failed due to transaction amount above CVM limit and PIN is not supported for the particular card type.

一卡通回傳碼說明

回傳碼 說明 備註
0000 執行正確
8000 設備異常報修
8001 設備異常報修
8002 設備異常報修
8003 設備異常報修
8004 設備異常報修
8005 設備異常報修
8006 設備異常報修
8007 設備異常報修
8008 設備異常報修
8009 設備異常報修
800A 設備異常報修
800B 設備異常報修
800C 設備異常報修
800D 設備異常報修
800E 設備異常報修
800F 偵測不到票卡
8010 設備異常報修
8011 多卡無法交易
8030 設備異常報修
8031 設備異常報修
8032 設備異常報修
8040 設備異常報修
8041 設備異常報修
8050 設備異常報修
8051 設備異常報修
8052 設備異常報修
8060 設備異常報修
8061 設備異常報修
8062 設備異常報修
8063 設備異常報修
8080 設備異常報修
8081 設備異常報修
8082 設備異常報修
8083 設備異常報修
8084 設備異常報修
8085 設備異常報修
8086 設備異常報修
8087 設備異常報修
8088 設備異常報修
8089 設備異常報修
808A 設備異常報修
808B 設備異常報修
808C 設備異常報修
808D 設備異常報修
808E 設備異常報修
808F 設備異常報修
8090 設備異常報修
8091 設備異常報修
8092 設備異常報修
8093 設備異常報修
8094 設備異常報修
8095 設備異常報修
8096 設備異常報修
8097 設備異常報修
8098 設備異常報修
8099 設備異常報修
809A 設備異常報修
809B 設備異常報修
809C 設備異常報修
809D 設備異常報修
809E 設備異常報修
8100 讀卡失敗重試
8101 讀卡失敗重試
8102 讀卡失敗重試
8103 讀卡失敗重試
8104 讀卡失敗重試
8105 讀卡失敗重試
8106 讀卡失敗重試
8107 讀卡失敗重試
8108 讀卡失敗重試
8109 讀卡失敗重試
810A 讀卡失敗重試
810B 讀卡失敗重試
810C 寫卡失敗重試
810D 設備損壞報修
810E 寫卡失敗重試
810F 寫卡失敗重試
8110 寫卡失敗重試
8111 寫卡失敗重試
8112 錯誤發卡單位
8113 票卡效期逾期
8114 票卡版本錯誤
8115 票卡已鎖卡
8116 票卡狀態錯誤
8117 票卡資料異常
8118 身分效期逾期
8119 非消費類票卡
811A 票值格式錯誤
811B 票值格式錯誤
811C 票值格式錯誤
811D 交易金額錯誤
811E 超過單筆上限
811F 超過當日上限
8120 票卡餘額不足
8121 超過餘額上限
8122 非原交易票卡
8123 加值金額異常
8124 無法自動加值
8125 票卡資料異常
8126 餘額高於門檻
8127 載入金鑰失敗
8130 非社福類票卡
8131 社福單位不符
8132 社福識別不符
8134 社福點數不足
8135 超過點數上限
8136 錯誤交易請求
8137 無效的票卡
8138 無效企業代碼
8139 無效識別單位
8140 無效識別身分
8180 讀卡失敗重試
8181 讀卡失敗重試
8182 讀卡失敗重試
8183 讀卡失敗重試
8184 讀卡失敗重試
8185 讀卡失敗重試
8186 讀卡失敗重試
8187 讀卡失敗重試
8188 讀卡失敗重試
8189 讀卡失敗重試
818A 讀卡失敗重試
818B 讀卡失敗重試
818C 讀卡失敗重試
818D 讀卡失敗重試
818E 讀卡失敗重試
818F 讀卡失敗重試
8190 讀卡失敗重試
8191 讀卡失敗重試
8192 讀卡失敗重試
8193 讀卡失敗重試
8194 讀卡失敗重試
8195 讀卡失敗重試
8196 讀卡失敗重試
8197 讀卡失敗重試
8198 讀卡失敗重試
8199 讀卡失敗重試
819A 讀卡失敗重試
819B 讀卡失敗重試
819C 讀卡失敗重試
819D 讀卡失敗重試
819E 讀卡失敗重試
819F 讀卡失敗重試
81A0 讀卡失敗重試
81A1 讀卡失敗重試
81A2 讀卡失敗重試
81A3 讀卡失敗重試
81A4 讀卡失敗重試
81A5 讀卡失敗重試
81A6 讀卡失敗重試
81A7 讀卡失敗重試
81A8 讀卡失敗重試
81A9 讀卡失敗重試
81AA 讀卡失敗重試
81AB 讀卡失敗重試
81AC 讀卡失敗重試
81AD 讀卡失敗重試
81AE 讀卡失敗重試
81AF 讀卡失敗重試
81B0 讀卡失敗重試
81B1 讀卡失敗重試
81B2 讀卡失敗重試
81BF 讀卡失敗重試
81C0 寫卡失敗重試
81C1 寫卡失敗重試
81C2 寫卡失敗重試
81C3 寫卡失敗重試
81C4 寫卡失敗重試
81C5 寫卡失敗重試
81C6 寫卡失敗重試
81C7 寫卡失敗重試
81C8 寫卡失敗重試
81C9 寫卡失敗重試
81CA 寫卡失敗重試
81CB 寫卡失敗重試
81CC 寫卡失敗重試
81CD 寫卡失敗重試
81CE 寫卡失敗重試
81CF 寫卡失敗重試
81D0 寫卡失敗重試
81D1 寫卡失敗重試
81D2 寫卡失敗重試
81D3 寫卡失敗重試
81D4 寫卡失敗重試
81D5 寫卡失敗重試
81D6 寫卡失敗重試
81D7 寫卡失敗重試
81D8 寫卡失敗重試
81D9 寫卡失敗重試
81DA 寫卡失敗重試
81DB 寫卡失敗重試
81DC 寫卡失敗重試
81DD 寫卡失敗重試
81DE 寫卡失敗重試
81DF 寫卡失敗重試
81E0 寫卡失敗重試
81E1 寫卡失敗重試
81E2 寫卡失敗重試
81E3 寫卡失敗重試
81E4 寫卡失敗重試
81E5 寫卡失敗重試
81E6 寫卡失敗重試
81E7 寫卡失敗重試
81E8 寫卡失敗重試
81E9 寫卡失敗重試
81EA 寫卡失敗重試
81EB 寫卡失敗重試
81EC 寫卡失敗重試
81ED 寫卡失敗重試
81EE 寫卡失敗重試
81EF 寫卡失敗重試
81F0 寫卡失敗重試
81F1 寫卡失敗重試
81F2 寫卡失敗重試
81FF 寫卡失敗重試
8200 時間錯誤報修
8201 變數錯誤報修
8202 檔案錯誤報修
8203 檔案錯誤報修
8204 檔案錯誤報修
8205 檔案錯誤報修
8206 檔案錯誤報修
8207 檔案錯誤報修
8208 檔案錯誤報修
8210 格式錯誤報修
8240 網路傳輸錯誤
8241 網路傳輸錯誤
8242 網路傳輸錯誤
8243 網路傳輸錯誤
8244 網路傳輸錯誤
8280 網路傳輸錯誤
8281 網路傳輸錯誤
8282 網路傳輸錯誤
8283 網路傳輸錯誤
8284 網路傳輸錯誤
8285 網路傳輸錯誤
8286 網路傳輸錯誤
8287 網路傳輸錯誤
82C0 網路傳輸錯誤
82C1 網路傳輸錯誤
82C2 網路傳輸錯誤
82C3 網路傳輸錯誤
82C4 網路傳輸錯誤
82C5 網路傳輸錯誤
82C6 網路傳輸錯誤
82C7 網路傳輸錯誤
82C8 網路傳輸錯誤
82C9 網路傳輸錯誤
82CA 網路傳輸錯誤
82CB 網路傳輸錯誤
8300 交易授權失敗
8301 交易授權失敗
8302 交易授權失敗
8303 註冊異常報修
8304 票卡進行鎖卡
8305 交易授權失敗
8306 銀行授權失敗
8307 交易授權失敗
8308 交易授權失敗
8309 交易授權失敗
830A 交易授權失敗
830B 設備時間異常
830C 無此交易功能
830D 交易授權失敗
830E 票卡資格錯誤
830F 交易授權失敗
8310 交易授權失敗
8311 交易授權失敗
8312 交易授權失敗
8313 交易重複失敗
8314 交易授權失敗
8315 交易授權失敗
8316 交易授權失敗
8317 交易授權失敗
8318 交易授權失敗
8319 交易授權失敗
831A 交易授權失敗
831B 交易授權失敗
831C 交易授權失敗
831D 交易授權失敗
831E 交易授權失敗
831F 交易授權失敗
8320 交易授權失敗
8321 交易授權失敗
8322 交易授權失敗
8323 交易授權失敗
8324 交易授權失敗
8325 交易授權失敗
8326 交易授權失敗
8327 交易授權失敗
8328 需清除系統檔
8329 已創立新業者
832A 交易授權失敗
832B 交易授權失敗
832C 交易授權失敗
832D 交易授權失敗
832E 交易授權失敗
832F 交易授權失敗
8330 交易授權失敗
8331 交易授權失敗
8332 交易授權失敗
8333 帳戶額度不足
8334 交易授權失敗
8335 交易授權失敗
8336 交易授權失敗
8337 交易授權失敗
8338 交易授權失敗
8339 交易授權失敗
833A 交易授權失敗
833B 交易授權失敗
833C 交易授權失敗
833D 交易授權失敗
833E 交易授權失敗
833F 交易授權失敗
8340 交易授權失敗
8341 交易授權失敗
8342 交易授權失敗
8343 交易授權失敗
8344 交易授權失敗
8345 交易授權失敗
8346 交易授權失敗
8347 交易授權失敗
8348 交易授權失敗
8349 交易授權失敗
834A 交易授權失敗
834B 交易授權失敗
834C 交易授權失敗
834D 交易授權失敗
834E 交易授權失敗
834F 交易授權失敗
8350 交易授權失敗
8351 交易授權失敗
8352 交易授權失敗
8353 交易授權失敗
8354 交易授權失敗
8355 交易授權失敗
8356 交易授權失敗
8357 交易授權失敗
8358 交易授權失敗
8359 交易授權失敗
835A 系統滿載中
835B 授權主機異常
835C 授權主機異常
835D 交易授權失敗
835E 授權主機異常
835F 結班不平帳
8360 授權主機異常
8361 授權主機異常
8362 交易授權失敗
8363 交易授權失敗
8380 網路簽章錯誤
8381 網路簽章錯誤
8382 網路簽章錯誤
8383 網路簽章錯誤
8384 網路簽章錯誤
8385 網路簽章錯誤
8386 網路簽章錯誤
8387 網路簽章錯誤
8388 網路簽章錯誤
8389 網路簽章錯誤
838A 網路簽章錯誤
838B 網路簽章錯誤
838C 網路簽章錯誤
838D 網路簽章錯誤
838E 網路簽章錯誤
838F 網路簽章錯誤
8390 沖正尚未傳送
8391 沖正操作失敗
8392 上傳紀錄失敗
83C0 交易成功報修
83C1 交易成功報修
83C2 票卡已鎖卡
83C3 交易紀錄未傳
83C4 查無對應交易
83C5 沖正尚未傳送
83C6 沖正傳送完成
83C7 尚未端末開機
83C8 完成端末開機
83C9 業者密碼錯誤
83CA 檔案錯誤報修
83CB 交易格試錯誤
83CC 錯誤交易類型
83CD 錯誤交易請求
83CE 尚未端末開機
83CF 尚未結班
83D0 請把票卡放回
83D1 交易成功報修
83D2 重複交易
83E0 錯誤交易類別
8400 加值失敗
8800 輸入格式錯誤
8801 輸入長度錯誤
8802 輸入命令錯誤
8803 輸入BCC錯誤
8804 輸入內容錯誤
8810 輸出內容錯誤
8830 位址轉IP錯誤
8831 交易失敗
8832 交易失敗
8833 交易失敗
8834 交易失敗
8840 電文傳送中止
8841 電文傳送中止
6000 金鑰錯誤
6FFF 金鑰錯誤

39Buy查詢Request共同欄位說明

項次 欄位 說明 型別 備註
1 page 頁數 int 預設1
2 perPage 每頁筆數 string 預設10,輸入all就是全部
3 keyword 名稱搜尋關鍵字 string

39Buy新增修改產品Request共同欄位說明

項次 欄位 說明 型別 備註
1 productNo 產品編號 string 非必要,如果未給值,系統將自動產生新的編號
2 productClass 所屬關聯分類資料,只需要上層的id即可 string array
3 productType 產品規格︰
1=單規格
2=雙規格
3=三規格
99=無規格
int 預設99
4 zhTwName 繁體產品名稱 string 繁體、英文、簡體三種語系必須選填一個
5 enUsName 英文產品名稱 string 繁體、英文、簡體三種語系必須選填一個
6 zhCnName 簡體產品名稱 string 繁體、英文、簡體三種語系必須選填一個
7 productSwitch 產品狀態︰
0=未開放購買
1=開放購買
2=草稿
3=結案
int 預設1
8 startOpenDate 開放產品可購買開始時間,格式為yyyy-MM-dd HH:mm:ss string 必要
9 endOpenDate 開放產品可購買結束時間,格式為yyyy-MM-dd HH:mm:ss string
10 payMode 產品可用付款方式 string 必要,各付款方式以逗號(,)隔開,請參考付款方式說明
11 textPeriod 定期定額周期選項 string
12 regularTotal 定期定額指定期數 string
13 tags 產品標籤,帶入標籤名稱 string array
14 zhTwProductDesc 產品簡短說明(繁中) string
15 enUsProductDesc 產品簡短說明(英文) string
16 zhCnProductDesc 產品簡短說明(簡中) string
17 zhTwPageDesc 頁面說明(繁中) string
18 enUsPageDesc 頁面說明(英文) string
19 zhCnPageDesc 頁面說明(簡中) string
20 imgData 產品圖片 list 請參考39Buy產品圖片欄位說明
21 shippingFeeTaiwan 台灣宅配運費 string 預設0
22 freeShippingTaiwan 台灣宅配免運門檻 string 預設0
23 shippingFeeIsland 台灣離島宅配運費 string 預設0
24 freeShippingIsland 台灣離島宅配免運門檻 string 預設0
25 shippingFeeChina 大陸宅配運費 string 預設0
26 freeShippingChina 大陸宅配免運門檻 string 預設0
27 shippingFeeOversea 海外宅配運費 string 預設0
28 freeShippingOversea 海外宅配免運門檻 string 預設0
29 buyerInfo 購買該產品時買家的必要欄位︰
name=姓名
phone=電話
address=地址
mail=e-mail
query_code=查詢碼
single_number=自取碼
memo=備註
payer_id=身份證字號
string 各欄位以逗號(,)隔開
30 pickUpType 取貨方式︰
0=無須取貨
1=宅配
2=自取
4=取貨付款
string 預設0,以逗號(,)隔開
31 enforceBuyPieces 強制購買數量 int
32 price 產品定價 string 必要
33 specialPrice 產品售價 string 必要
34 isReciprocal 是否開放倒數計數︰
0=否
1=是
int 預設0
35 salesRepId 綁定銷售人員 string array

39Buy修改產品Request共同欄位說明

項次 欄位 說明 型別 備註
1 uid 對應該產品的uid string 必要
2 deleteProductClass 刪除關聯分類資料的uid string array
3 deleteTags 欲刪除的標籤uid string array
4 deleteImgIds 欲刪除的產品圖id string array
5 deleteSpecUids 要刪除的商品副檔uid string array
6 enforce 檢查更新設定︰
0=不強制
1=強制
int 預設0,系統會檢查五分鐘內是否有人異動過,如果不檢查請帶1強制更新,如果未帶,一律檢查,如5分鐘內有人異動過,則回應警告訊息

39Buy產品圖片欄位說明

項次 欄位 說明 型別 備註
1 type 資料類型︰
1=上傳圖片:jpg、jpeg、png、gif
2=YouTube影片
3=圖片連結:限能用img src的URL
4=mp4、webm、ogg格式影片URL
int 必要
2 data 資料︰
1=使請用Base64格式
2=請使用YouTube網址尾碼
3=請使用完整URL
4=請使用完整URL
string 必要,且對應資料類型
3 description 圖片描述 string

39Buy產品規格欄位說明

項次 欄位 說明 型別 備註
1 erpNo ERP料號,對應當有內部料號,作為產品販賣時的對應 string
2 seqNo 規格排序 int 必要,請由數字1開始,如果重複,在抓取資料時,會按照異動時間排序
3 spec1Code 規格1代碼 string 依產品規格填寫
4 spec2Code 規格2代碼 string 依產品規格填寫
5 spec3Code 規格3代碼 string 依產品規格填寫
6 spec1CodeZhTwName 規格1繁體名稱 string 依產品規格填寫
7 spec1CodeZhCnName 規格1簡體名稱 string 依產品規格填寫
8 spec1CodeEnUsName 規格1英文名稱 string 依產品規格填寫
9 spec2CodeZhTwName 規格2繁體名稱 string 依產品規格填寫
10 spec2CodeZhCnName 規格2簡體名稱 string 依產品規格填寫
11 spec2CodeEnUsName 規格2英文名稱 string 依產品規格填寫
12 spec3CodeZhTwName 規格3繁體名稱 string 依產品規格填寫
13 spec3CodeZhCnName 規格3簡體名稱 string 依產品規格填寫
14 spec3CodeEnUsName 規格3英文名稱 string 依產品規格填寫
15 price 定價 string 預設為主檔price
16 specialPrice 售價 string 預設為主檔specialPrice
17 stockEnable 庫存是否啟用︰
0=disable
1=enable
int 預設0
18 stock 庫存 int 預設0
19 priceLimitMode 額度模式︰
1=定額
2=不定額
int 預設1
20 priceLimitMin 不定額情況下,最小額度是多少,如果為0,代表不限制 string 預設0

39Buy超渡產品規格欄位說明

項次 欄位 說明 型別 備註
1 產品規格欄位 產品規格的欄位 請參考39Buy產品規格欄位說明
2 ghostFestivalType 超渡類型︰
1=個別往生者
2=歷代祖先
3=寵物
4=地基主
5=嬰靈
6=冤親債主
7=其他
int 必要
3 birthdayType 生日是否強制必填︰
0=否
1=是
int 預設0
4 dieDayType 歿日是否強制必填︰
0=否
1=是
int 預設0

39Buy產品明細規格欄位說明

項次 欄位 說明 型別 備註
1 uid 產品副檔uid string
2 productNo 產品編號 string
3 serialNo 產品序號 string
4 erpNo ERP料號,對應當有內部料號,作為產品販賣時的對應 string
5 seqNo 規格排序 int
6 spec1Code 規格1代碼 string
7 spec2Code 規格2代碼 string
8 spec3Code 規格3代碼 string
9 spec1CodeZhTwName 規格1繁體名稱 string
10 spec1CodeZhCnName 規格1簡體名稱 string
11 spec1CodeEnUsName 規格1英文名稱 string
12 spec2CodeZhTwName 規格2繁體名稱 string
13 spec2CodeZhCnName 規格2簡體名稱 string
14 spec2CodeEnUsName 規格2英文名稱 string
15 spec3CodeZhTwName 規格3繁體名稱 string
16 spec3CodeZhCnName 規格3簡體名稱 string
17 spec3CodeEnUsName 規格3英文名稱 string
18 price 定價 string
19 specialPrice 售價 string
20 stockEnable 庫存是否啟用︰
0=disable
1=enable
int
21 stock 庫存 int
22 createdAt 建立時間 int
23 updatedAt 修改時間 int

39Buy產品明細圖片欄位說明

項次 欄位 說明 型別 備註
1 uid 圖片uid string
2 type 資料類型︰
1=上傳圖片:jpg、jpeg、png、gif
2=YouTube影片
3=圖片連結:限能用img src的URL
4=mp4、webm、ogg格式影片URL
int 必要
3 data 資料︰
1=使請用Base64格式
2=請使用YouTube網址尾碼
3=請使用完整URL
4=請使用完整URL
string 必要,且對應資料類型
4 description 圖片描述 string

39Buy交易Request共同欄位說明

項次 欄位 說明 型別 備註
1 designatePayMode 交易模式代號︰
1=信用卡
10=支付寶線上
13=微信支付線上
15=LINE Pay線上
27=Pi 拍錢包線上
31=街口支付線上
37=現金
98=所有線下交易
string 必要
2 printMode 列印模式︰
2=發票
String 必要
3 creditCardReceiptType 信用卡簽單類型︰
1=列印全部(商店存根&持卡人存根)
2=只印持卡人存根
string 當designatePayMode=1時必要
4 queryCode 訂單查詢碼 string
5 singleNumber 自取碼 string
6 memo 買家備註 string
7 currency 交易幣別︰
TWD=新台幣
CNY=人民幣
string 必要
8 customer 消費者資料 object 請參考消費者資料欄位說明
9 invoice 發票資料 object 請參考發票資料欄位說明
10 echo echo資料 object 請參考echo欄位說明

39Buy慈善交易Request共同欄位說明

項次 欄位 說明 型別 備註
1 39Buy交易Request共同欄位 39Buy交易Request的共同欄位 請參考39Buy交易Request共同欄位說明
2 payerBirthdayType 付款者生日類型︰
1=國曆
2=農曆
int 預設1
3 payerBirthdayTime 付款者生辰(00 ~ 23) string 如果不知生日期間,請統一帶99
4 payerLeap 付款者生辰是否為閏月︰
0=否
1=是
int 預設0
5 letterOfThanksMail 感謝信收件人mail string
6 letterOfThanksName 感謝信收件人姓名 string
7 letterOfThanksPhoneCode 感謝信收件人電話國碼 string
8 letterOfThanksPhone 感謝信收件人電話 string
9 letterOfThanksZipCode 感謝信收件人郵遞區號 string
10 letterOfThanksCountry 感謝信收件人國籍 string
11 letterOfThanksCity 感謝信收件人居住城市 string
12 letterOfThanksDistrict 感謝信收件人居住區域 string
13 letterOfThanksAddress 感謝信收件人地址 string

39Buy點燈名單欄位說明

項次 欄位 說明 型別 備註
1 name 點燈者名稱 string
2 birthdayType 點燈者生日類型︰
1=國曆
2=農曆
int 預設1
3 birthday 點燈者生日,格式為yyyy-MM-dd string 如果不知生日時間,請統一帶9999-99-99
4 birthdayTime 點燈者生辰(00 ~ 23) string 如果不知生日期間,請統一帶99
5 leap 是否為閏月︰
0=否
1=是
int 預設0
6 zipCode 點燈者郵遞區號 string
7 country 點燈者國家 string
8 city 點燈者居住城市 string
9 district 點燈者居住區域 string
10 address 點燈者地址 string
11 specData 產品列表 list 必要,請參考39Buy交易產品欄位說明

39Buy交易產品欄位說明

項次 欄位 說明 型別 備註
1 id 產品編號 string
2 name 產品名稱 string
3 price 產品單價 string
4 specUid 產品規格uid string
5 number 產品數量 int
6 amount 自訂額度 string 當規格為自訂額度時,才檢查此項目

39Buy產品分類列表欄位說明

項次 欄位 說明 型別 備註
1 uid 分類uid string
2 zhTwName 分類繁中名稱 string
3 level 層級 int
4 status 是否啟用︰
0=否
1=是
int

39Buy產品分類關聯欄位說明

項次 欄位 說明 型別 備註
1 parentUid 父層uid string 若為0,表示為最上層
2 productClassUid 子層uid string

39Buy產品欄位說明

項次 欄位 說明 型別 備註
1 uid 產品uid string
2 storeUid 特約商店編號 string
3 productNo 產品編號 string
4 productClass 產品分類 string array
5 zhTwName 繁體產品名稱 string
6 enUsName 英文產品名稱 string
7 zhCnName 簡體產品名稱 string
8 productSwitch 產品狀態︰
0=未開放購買
1=開放購買
2=草稿
3=結案
int
9 price 產品定價 string
10 specialPrice 產品售價 string
11 shortUrl 產品短網址 string

39Buy產品資料異常訊息欄位說明

項次 欄位 說明 型別 備註
1 productNo 產品編號 string
2 serialNo 產品序號 string
3 code 錯誤代碼 string

39Buy訂單資料欄位說明

項次 欄位 說明 型別 備註
1 uid 39Buy系統產生訂單編號 string
2 storeOrderId 特店帶入的訂單編號 string
3 orderDate 訂單日期,格式為yyyy-MM-dd HH:mm:ss string
4 shippingFee 運費 string
5 type 交易類型 int 請參考39Buy訂單產品類型說明
6 payMode 付款方式 int 請參考付款方式說明
7 payPrice 消費金額 string
8 refundPayPrice 退款金額 string
9 currencyCls 幣別記錄 string
10 cardNo 遮碼卡號 string
11 aCode 授權碼 string
12 discount 折扣金額 string
13 redeem 紅利兌換比例 string
14 retCode 付款狀態 string 請參考39Buy付款狀態說明
15 refundRetCode 退款狀態 string 請參考39Buy退款狀態說明
16 pickupType 取貨方式︰
0=無須取貨
1=線上下單宅配送貨
2=線上下單自取
3=門市下單宅配
4=門市下單自取
int
17 pickupAvailable 貨物狀態︰
0=狀態
1=已出貨(ALL)
2=可取貨(店自取)
3=已取貨(店自取)
4=已送達(送貨)
int
18 pickupDate 交貨時間,格式為yyyy-MM-dd HH:mm:ss string
19 singleNumber 貨運單號或取貨代碼 string
20 memo 買家留言 string
21 queryCode 訂單查詢碼 string
22 taxiCarNumber 計程車車號 string
23 taxiLicensePlateNumber 計程車車牌號碼 string
24-28 echo0 ~ ech4 自訂紀錄 string
29 invoice 發票回應資料 int, string 請參考39Buy發票回應資料欄位說明

39Buy發票回應資料欄位說明

項次 欄位 說明 型別 備註
1 invoiceRateType 稅率類型︰
0=無稅率
1=應稅
2=零稅率
3=免稅
int
2 invoiceInputType 類型︰
0=不開
1=雲端發票
2=發票捐贈
3=實體發票
4=外部發票
5=免用統一發票
6=農漁民收據
int
3 invoiceCloudType 雲端發票類型︰
2=手機條碼
3=自然人憑證條碼
4=以E-Mail寄送
int 類型為1才有作用
4 invoiceMobileCode 手機條碼 string 雲端發票類型為2才有作用
5 invoiceNaturalPerson 自然人憑證條碼(格式請自行驗證) string 雲端發票類型為3才有作用
6 invoiceLoveCode 愛心碼(格式請自行驗證) string 類型為2才有作用
7 invoiceB2bId 買受人發票統編(格式請自行驗證) string 類型為3才有作用
8 invoiceB2bTitle 發票抬頭 string 類型為3才有作用
9 invoiceNo 發票號碼 string
10 invoiceRandomNumber 發票隨機碼 string
11 invoiceSellerBan 發票賣方統編 string
12 invoiceTaxRate 發票稅率 string
13 invoiceLeftQrcode 發票左邊QR Cdoe string
14 invoiceRightQrcode 發票右邊QR Cdoe string
15 invoiceMiddleBarcode 發票中間BarCode string
16 invoiceDateTime 發票開立時間,格式為yyyy-MM-dd HH:mm:ss string
17 invoiceTitleType 發票標題類型︰
0=無設定
1=文字
2=圖片URL
int
18 invoiceTitle 發票標題 string

39Buy付款狀態說明

付款狀態 說明 備註
0 等待付款
1 金流確認中
2 預產單模式
3 交易取消
4 付款成功
5 交易失敗
6 預期交易
7 已撥款

39Buy退款狀態說明

退款狀態 說明 備註
0 未發動退貨
1 退貨處理中
2 退貨取消
3 退貨已完成

39Buy訂單欄位說明

項次 欄位 說明 型別 備註
1 uid 訂單uid string
2 storeOrderId 商店自定訂單id string
3 type 產品類型 int 請參考39Buy訂單產品類型說明
4 orderDate 訂單日期 string
5 payPrice 訂單金額 string
6 payMode 付款方式 int
7 retCode 付款狀態 string 請參考39Buy付款狀態說明
8 refundRetCode 退款狀態 string 請參考39Buy退款狀態說明
9 payerName 付款人姓名 string
10 payerPhoneCode 付款人手機國碼 string
11 payerPhone 付款人手機號碼 string
12 payerMail 付款人email string
13 queryCode 訂單查詢碼 string
14 letterOfThanksMail 感謝信收件人mail string
15 letterOfThanksName 感謝信收件人姓名 string

39Buy訂單產品細項欄位說明

項次 欄位 說明 型別 備註
1 uid 產品副檔uid string
2 orderUid 訂單編號 string
3 productUid 對應該訂單子項目的單元產品uid (mdes_products->uid),用在退貨時加回庫存 string
4 productNo 產品編號 string
5 erpNo 產品料號 string
6 serialNo 產品序號 string
7 zhTwName 產品名稱(繁中) string
8 enUsName 產品名稱(簡中) string
9 zhCnName 產品名稱(簡中) string
10 price 產品單價 string
11 number 訂購數量 int
12 startDate 產品起始有效日 string
13 endDate 產品結束有效日 string
14 contractGuaranteeStartDate 履約擔保日期起 string
15 contractGuaranteeEndDate 履約擔保日期迄 string
16 inputDetailInfo 原始帶入的商品資訊JSON string string
17 productInfo 轉成自己的產品格式JSON string,記錄相關產品資訊,因應立即購買的訂單類型 string
18 saleType 商品類型︰
1=商品
2=加購品
3=不限制
4=贈品
5=運費
6=全館活動折扣
7=折價劵
8=紅利點數
int
19 printOut 用於通知是否顯示於收據明細︰
0=不顯示
1=顯示
int
20 createdAt 建立時間 string
21 updatedAt 修改時間 string
22 refundStatus 退貨狀態︰
0=未退
1=已退
int

39Buy訂單付款資料欄位說明

項次 欄位 說明 型別 備註
1 id 流水號 string
2 orderUid 訂單編號 string
3 keyUid 購買編號-金流的交易編號(UID) string
4 storeToken 次特店驗證碼 string
5 refundUid 退款訂單流水號 string
6 charge 單次扣款金額 string
7 orderState 對應金流系統的訂單狀態 string
8 memo 註解 string
9 payDate 金流的付款日期 string
10 payMode 付款方式 string
11 paymentName 定期定額扣款名稱 string
12 nois 定期定額期數 string
13 cost 金額 string
14 feePrice 交易手續費 string
15 refundFeePrice 退款手續費 string
16 cardNo 卡號 string
17 aCode 授權碼 string
18 cardType 信用卡類別︰
0=無法辨識或支付方式為非信用卡類
1=VISA
2=MasterCard
3=JCB
4=AMEX
string
19 issuingBank 發卡行 string
20 issuingBankUid 發卡銀行代碼 string
21 transactionMode 交易服務類型︰
0=尚未進行閘道交易
1=代收代付
2=特店模式
string
22 supplierName 交易之金融服務商 string
23 supplierCode 交易之金融服務商代碼 string
24 data 回傳資料紀錄 string
25 createdAt 建立時間 string
26 updatedAt 修改時間 string

39Buy訂單產品類型說明

訂單產品類型 說明 備註
0 異常交易類型
1 一般商品
3 慈善捐款
8 快速結帳
10 一碼貸
11 TrCode
12 月費型商品
13 票劵/課程類型商品
14 訂單系統-發票
15 訂單系統-明細
16 點餐單
17 慈善-點燈
18 慈善-超渡
19 任意付

39Buy回傳碼說明

回傳碼 說明 備註
0 執行成功
100 串接基本資料錯誤
API_003 內部AP串接欄位錯誤
200 登入成功,或資料正確,API收到正確資料
500 登入失敗
900 Token無效,請重新登入系統
App回傳碼 MYPAY APP處理錯誤的回傳碼 請參考App回傳碼說明

39Buy新增產品回傳碼說明

新增產品回傳碼 說明 備註
39Buy回傳碼 請參考39Buy回傳碼說明
A0000 新增成功
A0001 查無商品
A0002 商品名稱請擇一必填
A0003 商品類型必填
A0004 商品規格必填
A0005 商品起始時間規則錯誤
A0006 支付工具必填
A0007 商品起始時間必須大於結束時間
A0008 商品編號重複
A0009 規格代碼重複
A0010 規格代碼沒有填值
A0011 超渡類型不符
A9999 新增異常

39Buy修改產品回傳碼說明

修改產品回傳碼 說明 備註
39Buy回傳碼 請參考39Buy回傳碼說明
E0000 修改成功
E0001 5分鐘內有人異動,是否再度異動
E0002 查無商品
E0003 商品類型與原類型不同
E0004 商品名稱請擇一必填
E0005 商品類型必填
E0006 商品規格必填
E0007 商品起始時間規則錯誤
E0008 支付工具必填
E0009 修改者必填
E0010 商品起始時間必須大於結束時間
E0011 商品在5分鐘內已有修改過,不更新,如要強制更新,請調整強制更新參數
E9999 修改異常

39Buy交易回傳碼說明

交易回傳碼 說明 備註
39Buy回傳碼 請參考39Buy回傳碼說明
B0000 交易成功
B0001 商品已下架
B0002 商品庫存不足
B0003 查無商品
B0004 金額不符
B0005 沒有交易商品
B0006 小於最低額度
B0007 不支援此支付方式
B0008 付款人姓名未填寫
B0009 付款人電話未填寫
B0010 付款人地址未填寫
B0011 付款人E-mail未填寫
B0012 付款人訂單查詢碼未填寫
B0013 付款人訂單取貨碼未填寫
B0014 付款人備註未填寫
B0015 交易成功,等待消費者付款
B0016 查無此清單資訊
B0017 查無商店
B0018 大特店商務代號錯誤
B0019 此清單中不含有此商品
B0020 清單活動異常設定,折扣金額大於結帳金額
B9997 驗證無誤,可以執行交易
B9998 交易異常,請15分鐘後重新查詢交易結果
B9999 交易失敗

付款類型說明(對應付款方式)

付款類型 說明 備註
CREDITCARD 信用卡 1
ABROAD 海外信用卡 9
ALIPAY 支付寶線上 10
WECHAT 微信支付線上 13
WECHATOFF 微信支付線下 19
LINEPAYON LINE Pay線上 15
LINEPAYOFF LINE Pay線下 16
PION Pi 拍錢包線上 27
PIOFF Pi 拍錢包線下 28
JKOON 街口支付線上 31
JKOOFF 街口支付線下 32
CASH 現金交易 37

付款方式說明(對應付款類型)

付款方式 說明 備註
1 信用卡 CREDITCARD
9 海外信用卡 ABROAD
10 支付寶線上 ALIPAY
13 微信支付線上 WECHAT
15 LINE Pay線上 LINEPAYON
16 LINE Pay線下 LINEPAYOFF
19 微信支付線下 WECHATOFF
27 Pi 拍錢包線上 PION
28 Pi 拍錢包線下 PIOFF
31 街口支付線上 JKOON
32 街口支付線下 JKOOFF
37 現金交易 CASH

MYPAY APP測試流程

直接交易

  1. 從應用市場中安裝最新版本的MYPAY APP。
  2. 進入MYPAY APP進行登入,並確認登入是否成功(登入成功會看到上方有商店名稱,下方有登出的按鈕)。
  3. 離開MYPAY APP,並在串接方App中將資料傳入MYPAY APP進行動作。

TAP交易(只有MYPAY TAP APP支援)

  1. 從應用市場中安裝最新版本的MYPAY TAP APP。
  2. 進入MYPAY TAP APP進行登入,並確認登入是否成功(登入成功會看到上方有商店名稱,下方有登出的按鈕)。
  3. 離開MYPAY TAP APP,並在串接方App中將資料傳入MYPAY TAP APP進行動作。

一卡通交易(Lib 0.2.0)

  1. 從應用市場中安裝最新版本的MYPAY APP。
  2. 進入MYPAY APP進行登入,並確認登入是否成功(登入成功會看到上方有商店名稱,下方有登出的按鈕)。
  3. 離開MYPAY APP,並在串接方App中將資料傳入MYPAY APP進行動作。

其它動作(Lib 0.1.5)

  1. 從應用市場中安裝最新版本的MYPAY APP。
  2. 進入MYPAY APP進行登入,並確認登入是否成功(登入成功會看到上方有商店名稱,下方有登出的按鈕)。
  3. 離開MYPAY APP,並在串接方App中將資料傳入MYPAY APP進行動作。

MYPAY頁面(Lib 0.1.8)

  1. 從應用市場中安裝最新版本的MYPAY APP。
  2. 進入MYPAY APP進行登入,並確認登入是否成功(登入成功會看到上方有商店名稱,下方有登出的按鈕)。
  3. 離開MYPAY APP,並在串接方App中將資料傳入MYPAY APP進入指定的頁面。

39Buy交易(Lib 0.0.56)

  1. 從應用市場中安裝最新版本的MYPAY APP。
  2. 進入MYPAY APP進行登入,並確認登入是否成功(登入成功會看到上方有商店名稱,下方有登出的按鈕)。
  3. 離開MYPAY APP,在串接方App中將資料傳入MYPAY APP進行手動登入,取得token。
  4. 每次對MYPAY APP進行動作時須將appToken傳入。
  5. 若MYPAY APP返回token無效的錯誤,請再重新手動登入以取得新的token,再進行其它動作。

藍牙串接 (APP v3.9.0)

  1. 從應用市場中安裝最新版本的MYPAY APP。
  2. 進入MYPAY APP進行登入,並確認登入是否成功(登入成功會看到上方有商店名稱,下方有登出的按鈕)。
  3. 串接方使用的裝置和已安裝MYPAY APP的設備配對藍牙。
  4. 將藍牙傳輸設定頁面中確認的藍牙串接ID加入串接方程式。
  5. 離開MYPAY APP (Android 11以上的設備,請開啟MYPAY APP,若關閉APP,可能會有收到不請求的問題),在串接方程式中將資料加密並透過藍牙傳入MYPAY APP進行動作。

瀏覽器串接 (APP v3.9.1)

  1. 從應用市場中安裝最新版本的MYPAY APP。
  2. 進入MYPAY APP進行登入,並確認登入是否成功(登入成功會看到上方有商店名稱,下方有登出的按鈕)。
  3. 離開MYPAY APP,並在串接方Web程式中將資料加密並透過Intent傳入MYPAY APP進行動作。

版本紀錄

MyPayCommon

版本號 日期 異動
0.0.34 2021-06-07 新增︰
1. PrintRequest & PrintResponse (可列印發票加明細、單純發票、單純明細)
2. Item.isPrintOut (是否可以在明細上印出)

棄用︰
PrintInvoiceRequest & PrintInvoiceResponse (列印發票)
0.0.45 2021-08-09 新增︰
1. ActionDetails串接方式
2. 所有可使用的AppRequest常數至Constant中
3. 列印的AppRequest.logoBase64
0.0.50 2021-09-01 新增︰
Constant.PRINT_MODE_CREDIT_CARD_RECEIPT (可重印簽單)
0.0.51 2021-09-02 新增︰
Constant.CREDIT_CARD_RECEIPT_TYPE_ALL & Constant.CREDIT_CARD_RECEIPT_TYPE_ONLY_CUSTOMER_RECEIPT (可列印商店存根加持卡人存根、單純持卡人存根)
0.0.56 2021-12-30 新增︰
Constant.ACTION_39_BUY_ADD_LIGHT_PRODUCT
Constant.ACTION_39_BUY_ADD_PRODUCT_LEVEL
Constant.ACTION_39_BUY_EDIT_LIGHT_PRODUCT
Constant.ACTION_39_BUY_EDIT_PRODUCT_LEVEL
Constant.ACTION_39_BUY_LOGIN
Constant.ACTION_39_BUY_LOGOUT
Constant.ACTION_39_BUY_QUERY_ORDER
Constant.ACTION_39_BUY_QUERY_ORDER_DETAILS
Constant.ACTION_39_BUY_QUERY_PRODUCT
Constant.ACTION_39_BUY_QUERY_PRODUCT_DETAILS
Constant.ACTION_39_BUY_QUERY_PRODUCT_LEVEL
Constant.ACTION_39_BUY_QUERY_PRODUCT_LEVEL_DETAILS
Constant.ACTION_39_BUY_QUERY_PRODUCT_LEVEL_RELATION
Constant.ACTION_39_BUY_SEND_LIGHT_TRANSACTION
Constant.ACTION_39_BUY_UPDATE_PRODUCT_LEVEL_RELATION
Constant.ACTION_39_BUY_VALIDATE_APP_TOKEN

棄用︰
舊版API
0.0.57 2022-02-16 新增︰
Constant.ACTION_39_BUY_ADD_DONATION_PRODUCT
Constant.ACTION_39_BUY_ADD_GENERAL_PRODUCT
Constant.ACTION_39_BUY_ADD_QUICK_PAY_PRODUCT
Constant.ACTION_39_BUY_ADD_RELEASE_PRODUCT
Constant.ACTION_39_BUY_EDIT_DONATION_PRODUCT
Constant.ACTION_39_BUY_EDIT_GENERAL_PRODUCT
Constant.ACTION_39_BUY_EDIT_QUICK_PAY_PRODUCT
Constant.ACTION_39_BUY_EDIT_RELEASE_PRODUCT
Constant.ACTION_39_BUY_SEND_DONATION_TRANSACTION
Constant.ACTION_39_BUY_SEND_GENERAL_TRANSACTION
Constant.ACTION_39_BUY_SEND_QUICK_PAY_TRANSACTION
Constant.ACTION_39_BUY_SEND_RELEASE_TRANSACTION
0.1.0 2022-03-07 刪除︰
所有舊版API (不向下相容)
0.1.1 2022-05-03 新增︰
Constant.BUY_39_PRINT_MODE_FREE_OF_INVOICE_RECEIPT
Constant.BUY_39_PRINT_MODE_FARMER_FISHERMAN_RECEIPT
0.1.2 2022-05-19 新增︰
Constant.ACTION_FASSTAP
0.1.3 2022-06-13 新增︰
Constant.ACTION_TAP

刪除︰
Constant.ACTION_FASSTAP (不向下相容)
0.1.5 2022-06-30 新增︰
Constant.ACTION_SCAN_CODE
0.1.6 2022-07-05 新增︰
Constant.ACTION_39_BUY_SEND_SCAN_ITEM_TRANSACTION
0.1.7 2022-07-29 新增︰
Constant.ACTION_39_BUY_REFUND_SCAN_ITEM
0.1.8 2022-08-08 新增︰
Constant.PAGE_MYPAY_ORDER_LIST
0.1.9 2022-09-05 新增︰
Constant.PAGE_MYPAY_FOOD_ORDER_LIST
Constant.PAGE_MYPAY_INVOICE_MANAGEMENT
Constant.PAGE_MYPAY_RECEIPT_MANAGEMENT
Constant.PAGE_MYPAY_PRINTER_SETTINGS
Constant.PAGE_MYPAY_URL_SETTINGS
0.2.0 2022-10-04 新增︰
Constant.ACTION_I_PASS_CANCEL
Constant.ACTION_I_PASS_CLOSE_BATCH
Constant.ACTION_I_PASS_QUERY_CARD
Constant.ACTION_I_PASS_REDEEM
Constant.ACTION_I_PASS_REFUND
Constant.ACTION_I_PASS_RELOAD
Constant.PAGE_MYPAY_SETTLEMENT_SETTINGS
0.2.2 2022-10-07 新增︰
Constant.ACTION_I_PASS_SEND_TRANSACTION
Constant.RECEIPT_TYPE_FREE_OF_INVOICE_RECEIPT
Constant.RECEIPT_TYPE_FARMER_FISHERMAN_RECEIPT

刪除︰
Constant.ACTION_I_PASS_CANCEL (不向下相容)
Constant.ACTION_I_PASS_REDEEM (不向下相容)
Constant.ACTION_I_PASS_REFUND (不向下相容)
Constant.ACTION_I_PASS_RELOAD (不向下相容)
0.2.3 2022-10-12 新增︰
Constant.PRINT_MODE_FREE_OF_INVOICE_RECEIPT
Constant.PRINT_MODE_FARMER_FISHERMAN_RECEIPT
0.2.4 2022-11-22 新增︰
Constant.ACTION_QUERY_COUPON_CODE
0.2.5 2022-12-19 新增︰
Constant.ACTION_GET_SUPPORTED_PAY_MODES
0.2.6 2023-01-31 新增︰
Constant.PAY_MODE_ID_EASY_WALLET
Constant.BUY_39_PAY_MODE_ID_EASY_WALLET
0.2.7 2023-03-21 新增︰
Constant.PAGE_MYPAY_SETTLEMENT_REPORT
0.2.8 2023-09-13 刪除︰
Constant.PAGE_MYPAY_SETTLEMENT_SETTINGS (不向下相容)
0.2.9 2024-01-09 新增︰
Constant.PAY_MODE_ID_PLUS_PAY
Constant.PAY_MODE_ID_PX_PAY
0.3.0 2024-01-18 新增︰
Constant.ACTION_GET_SUPPORTED_ACTUAL_PAY_MODES
0.3.1 2024-02-07 新增︰
Constant.ACTION_SCAN_CODE_FLUTTER_LIB (實驗性功能)

注意︰

  • 0.0.56之後只支援ActionDetails串接方式,不接受舊版API的串接方式呼叫MYPAY APP。

  • 0.1.8之後新增以PAGE_開頭的動作,相關動作可讓串接方App直接使用MYPAY APP定義的頁面,無需自行開發。

  • 標記"不向下相容"之項目,串接方App若有影響必須對其程式進行修正,以避免上線時發生不可預期的問題。

  • 標記"實驗性功能"之項目,為實驗測試功能,主要只會更新在測試版本上,請避免在正式版本中串接此功能。

MYPAY APP

版本號 測試更新日期 正式更新日期 異動 對應Lib版本
2.2.0 2021-06-16 修正︰
1. 所有交易列印單據與發票流程
2. 部分流程與問題
0.0.34
2.2.1 2021-06-18 2021-06-22 修正︰
部分文字

刪除︰
交易列印收據流程
0.0.34
2.4.2 2021-08-23 新增︰
1. Cross App使用ActionDetails方式串接
2. API呼叫卡機重印或補印發票
3. 列印標題圖片可使用logoBase64

修正︰
1. 推播部分流程與錯誤
2. 部分卡片無法感應問題
3. 完善訂單列印流程
0.0.45
2.4.3 新增︰
1. 交易金額3000元以下簽單免簽
2. Cross App可使用重印簽單功能

修正︰
1. 信用卡簽單格式
2. Cross App列印發票無圖片資料時,標題圖片為空白問題
0.0.50
2.4.4 新增︰
Cross App可使用列印商店存根加持卡人存根、單純持卡人存根(AppRequest.creditCardReceiptType)
0.0.51
2.4.5 2021-09-15 新增︰
1. API可使用重印簽單功能
2. API可使用列印商店存根加持卡人存根、單純持卡人存根
3. API可使用列印點餐單明細功能
4. API可使用退款功能

修正︰
信用卡交易無發票時閃退問題
0.0.51
2.4.6 2021-09-27 新增︰
1. API可使用列印點餐單功能
2. 訂單通知音效
0.0.51
2.4.7 2021-09-28 修正︰
推播錯誤無顯示訊息問題
0.0.51
2.4.8 2021-09-29 2021-09-29 修正︰
1. 多個訂單列印無反應問題
2. 信用卡簽單格式
0.0.51
2.4.9 2021-10-14 新增︰
點餐單管理功能

修正︰
1. 點餐單列印順序問題
3. 新訂單音效播放問題
4. 列印訂單發票時間問題
5. 訂單發票多通知問題
0.0.51
2.5.0 2021-11-12 新增︰
訂單管理功能

修正︰
1. 讀卡Undefined錯誤顯示問題
2. 帳號無金鑰錯誤顯示與流程問題
0.0.51
2.5.1 2021-11-16 修正︰
1. 讀卡金額有小數時-50019問題
2. 訂單管理顯示當日交易問題
0.0.51
2.5.2 2021-11-18 修正︰
1. Cross App舊版退款問題
2. Cross App ActionDetails查詢交易未回傳key問題
0.0.51
2.5.3 2021-11-23 新增︰
DB Migration機制

修正︰
Cross App ActionDetails查詢交易未回傳cardNo問題
0.0.51
2.5.4 2021-11-24 2021-11-30 修正︰
1. 信用卡交易問題
2. Cross App ActionDetails查詢交易未回傳refundUidList問題
0.0.51
2.5.5 2021-12-01 2021-12-01 快速修正︰
1. 無法進入登入頁問題
2. 任務列表為Service
0.0.51
2.5.6 2021-12-07 新增︰
一卡通測試頁面

修正︰
有統編發票格式問題
0.0.51
2.5.7 2022-01-06 新增︰
1. 阻擋Cross App舊版API呼叫方式
2. Cross App支援39Buy登入、登出、驗證Token、產品、訂單功能

修正︰
隱藏一卡通測試頁面
0.0.56
2.5.8 2022-01-24 2022-02-14 新增︰
Cross App支援39Buy點燈交易功能
0.0.56
2.5.9 2022-02-11 修正︰
一卡通測試交易結果顯示
0.0.56
2.6.0 2022-02-21 新增︰
1. Cross App支援39Buy新增修改一般、捐款、一碼付與超渡產品功能
2. Cross App支援39Buy一般、捐款、一碼付與超渡交易功能

修正︰
部分39Buy API缺少欄位與錯誤
0.0.57
3.0.0 2022-03-21 新增︰
1. 刪除超過半年的Local交易紀錄
2. 交易狀態Local紀錄
3. 交易成功失敗回傳後端
4. 讀卡流程可手動取消

修正︰
1. SoundUtils NPE問題
2. Cross App交易回傳流程問題
3. 讀卡無執行完整EMV流程問題

刪除︰
所有Cross App舊版API程式 (不向下相容)
0.1.0
3.1.0 2022-04-22 新增︰
1. 支援不同的Driver程式
2. 發票管理頁面

修正︰
1. Cross App判斷錯誤storeUid問題 (不向下相容)
2. Cross App MyPay使用現金未阻擋問題
3. Cross App 39Buy auth必須傳入storeUid問題
4. DB Migration未執行問題
5. 有統編發票無列印item列表問題

更新︰
顯示Toast與Dialog UI
0.1.0
3.1.1 2022-04-22 2022-04-29 修正︰
發票與明細格式
0.1.0
3.1.3 2022-05-17 2022-05-19 新增︰
1. 判斷AppRequest必要值 (不向下相容)
2. 39Buy交易狀態Local紀錄
3. Cross App 39Buy可列印免用統一發票收據與農漁民收據
4. 訂單列表與明細顯示交易類型

修正︰
1. 信用卡NFC感應限額問題
2. JCB感應NFC錯誤問題
3. 重印簽單問題
4. 取得發票號碼閃退問題
5. 列印失敗NPE問題
0.1.1
3.1.5 2022-06-15 新增︰
1. 處理交易中斷機制
2. 判斷Cross App MyPay退款時不可帶入空的uid與key (不向下相容)
3. 訂單列表可查詢LOG狀態

修正︰
1. 部分交易9999錯誤為可預期的錯誤
2. 退款回傳錯誤的uid問題
3. Local交易狀態紀綠在交易錯誤時訂單日期為空的問題
4. Local交易狀態可區分交易成功,列印失敗的情況
5. 重複退款時產生多筆Local交易狀態紀綠問題
6. Cross App MyPay查詢交易未回傳status與statusMsg問題
0.1.2
3.1.6 2022-06-22 2022-06-23 新增︰
1. 印表機設定頁面
2. 支援商米雲端印表機列印功能

修正︰
1. Cross App 39Buy LINEPay線上查詢交易結果直接返回問題
2. Cross App 39Buy使用Customer、Invoice、Echo參數傳入 (不向下相容)
3. Cross App 39Buy交易Item欄位支援列印單據品項
4. 進入APP無網路時畫面卡住問題
5. MYPAY TAP流程與UI問題
6. API呼叫卡機紀錄Local交易流程問題
0.1.3
3.1.7 2022-08-04 新增︰
1. Cross App掃碼回傳功能
2. Cross App 39Buy任意付交易與任意付退款功能
3. 商米雲端印表機可列印免用統一發票收據與農漁民收據
4. 印表機設定頁面可選擇印表機優先權與測試列表功能
5. 免用統一發票收據與農漁民收據列印可使用local圖片

修正︰
1. Android O以上使用JobService
2. 發票QR Code容錯率為L且右邊QR Code最多只保留兩個商品資訊
3. 處理交易中斷機制發動時機
4. 掃碼收款使用自訂的照機頁面
5. Cross App 39Buy登入未儲存profile問題
6. Cross App 39Buy交易使用免用統一發票收據與農漁民收據傳入Item格式
7. Cross App 39Buy取得訂單列表總金額格式與未回傳orderId問題
8. 39Buy雲端訂單列印流程
9. 單據管理頁面問題
10. 商米雲端印表機列印發票與簽單格式問題

刪除︰
定時處理交易中斷機制
0.1.7
3.2.0 2022-08-12 新增︰
Cross App金流訂單列表功能

修正︰
Cross App金流交易不支援現金交易問題
0.1.8
3.2.1 2022-08-23 新增︰
1. 交易回傳設定頁面
2. 回傳金流交易與退款結果流程

修正︰
Cross App金流訂單明細頁UI與顯示的資料

更新︰
Cross App金流訂單列表頁之搜尋工具條件為支付工具、金流編號、訂單編號、發票號碼等多條件
0.1.8
3.2.2 2022-08-31 修正︰
1. Cross App金流訂單列表頁以發票號碼查詢無顯示退款交易問題
2. Cross App金流訂單明細頁重印退款簽單與補印發票問題
3. 交易或退款成功response的aCode為null與未隱藏列印資訊問題
0.1.8
3.2.3 2022-09-06 新增︰
Device ID資訊頁面

修正︰
1. 非卡機之一般裝置停在App進入頁問題
2. 印表機設定頁測試列印問題
3. 發票列印左右QR Code大小問題
0.1.8
3.2.4 2022-09-07 修正︰
1. QR Code線上交易頁QR Code位置
2. QR Code線上交易無發票時回應280問題
3. 發票列印左右QR Code大小問題
0.1.8
3.2.5 2022-09-12 2022-09-13 新增︰
1. Cross App點餐單列表功能
2. Cross App發票管理功能
3. Cross App收據管理功能
4. Cross App印表機設定功能
5. Cross App交易回傳設定功能
6. 交易回傳結果多回傳一碼付echo

修正︰
部分頁面隱藏鍵盤問題
0.1.9
3.3.0 2022-10-05 新增︰
1. Cross App一卡通交易功能
2. Cross App結班設定功能
3. 處理錯誤device id機制

修正︰
1. 交易回傳結果一碼付echo名稱問題
2. 訂單明細頁右方資料顯示問題
0.2.0
3.3.1 修正︰
1. Cross App金流交易無法列印免用統一發票收據與農漁民收據問題
2. Cross App一卡通交易使用單一action
3. Cross App一卡通快速與離線詢卡未顯示錯誤訊息問題
4. Cross App一卡通連線詢卡未判斷order id問題 (不向下相容)
0.2.3
3.3.2 2022-11-01 新增︰
1. 阻擋螢幕截圖功能
2. Device資訊頁可確認設備型號

修正︰
1. K2 MINI上掃描使用相機問題
2. 登入頁在部分設備上無法捲動問題
0.2.3
3.3.6 2022-12-14 新增︰
1. 加密App敏感性資料
2. DB Migration進度更新頁面與流程
3. 驗證使用者輸入資料,並於輸入資料正確後才可點擊按鈕進行後續動作
4. 登入頁可選紀錄登入資訊
5. 特店金鑰過期提示
6. 支援一碼付合作夥伴API流程

修正︰
1. 未先登入MYPAY APP無顯示錯誤訊息問題
2. 發票字軌設定相關頁面無法捲動問題
3. 下拉式選單項目太小點擊異常問題
4. 登入頁輸入商務代號與登入帳號為可隱碼
5. 交易查詢改為先查詢Local DB資料而後才為Server端的資料

更新︰
1. 保留Local DB交易區間(半年 -> 1個月)
2. 取得發票數量位數(4 -> 3)
0.2.4
3.3.7 2022-12-27 2023-01-05 新增︰
1. Cross App取得特店支援的支付方式功能
2. 處理國外信用卡交易流程與警示

修正︰
1. Cross App參數錯誤相對應的錯誤訊息
2. 判斷發票可列印的條件
3. 部分交易無法列印免用統一發票收據與農漁民收據問題
4. QR Code線上交易使用雲端發票參數卻會印出發票問題

更新︰
頁面名稱 (交易回傳設定 -> 合作夥伴URL設定)
0.2.5
3.3.8 2023-01-10 修正︰
1. QR Code線上交易列印發票錯誤問題
2. Local DB紀綠deviceId、一碼付echo、itemList為空值問題
3. 金流訂單列表頁以發票號碼查詢無包含時間條件問題
4. 金流訂單列表頁以發票號碼查詢無資料問題
5. 金流訂單明細頁參數錯誤時還可進行退款問題
6. 一碼付合作夥伴交易回傳條件
0.2.5
3.3.10 2023-01-16 2023-01-16 修正︰
1. Cross App金流退款未傳入invoiceState參數問題
2. Local DB無交易時無法退款問題
3. 無法重印國外信用卡簽單問題
0.2.5
3.3.11 2023-02-01 新增︰
Cross App金流QR Code線上交易支援悠遊付

修正︰
1. Cross App訂單查詢資料未完整問題
2. 收據管理頁無法拍照問題
0.2.6
3.4.0 2023-02-16 新增︰
金流訂單明細頁可更新交易狀態按鈕

修正︰
1. 金流訂單明細頁訂單管理功能可使用條件
2. 印表機設定頁與API設定頁儲存和清除資料問題

更新︰
1. MYPAY logo背景圖片
2. 新增發票區間頁與取得發票號碼頁UI
0.2.6
3.4.1 2023-03-06 2023-03-03 部分部署 新增︰
金流訂單明細頁顯示發票類型

修正︰
1. Device資訊頁Android 10以上設備閃退問題
2. 金流交易與訂單明細頁可列印發票條件
3. 金流退款時發票選項為作廢
0.2.6
3.4.2 2023-03-13 2023-03-10 部分部署 修正︰
1. Cross App 39Buy登入頁鍵盤問題
2. Cross App取得特店支援的支付方式問題
0.2.6
3.5.0 2023-03-22 新增︰
Cross App結帳報表功能
0.2.7
3.6.0 2023-04-07 修正︰
結帳報表區間可重疊與可選未來時間問題
0.2.7
3.6.1 2023-04-14 新增︰
金流交易可列印交易明細功能(20230414)
0.2.7
3.6.4 2023-04-24 新增︰
金流訂單明細頁可傳送交易結果功能

修正︰
1. device id和model取得流程
2. 金流訂單明細頁按鈕可連續點擊問題
3. 金流訂單列表與明細頁退款錯誤與顯示問題
0.2.7
3.6.5 2023-05-02 新增︰
1. 金流訂單明細頁可重印交易明細功能
2. 金流訂單明細頁退款可選作廢折讓功能

修正︰
1. 金流訂單明細頁退款交易未顯示發票資訊問題
2. 結帳報表資料未依特店顯示問題
3. 結帳報表錯誤訊息
4. 列印商品明細格式
5. 一卡通相關流程與顯示問題
0.2.7
3.7.0 2023-05-25 新增︰
1. 登入時儲存Gateway資訊
2. TAP交易回傳金流流程
3. 限制退款可選作廢折讓條件
4. 金流訂單列表頁顯示退款失敗訊息

修正︰
結帳報表顯示錯誤流程與訊息

更新︰
39Buy登入時儲存資料流程
0.2.7
3.8.0 2023-07-26 新增︰
1. 一卡通回傳金流交易流程
2. 結帳報表頁結帳時處理一卡通結班流程

修正︰
1. 金流訂單列表頁顯示一卡通退款失敗訊息
2. 一卡通交易儲存Local DB的資料格式

更新︰
39Buy登入頁登入權限
0.2.7
3.8.2 2023-08-08 修正︰
結帳報表頁閃退問題
0.2.7
3.8.3 2023-08-09 2023-08-10 修正︰
1. 商米V2無法取得SN問題
2. 部分工具release閃退問題

更新︰
商米Printer取得驅動的程式
0.2.7
3.8.5 2023-08-24 2023-08-24 快速修正︰
1. 金流訂單明細頁發票資訊在Server發生錯誤無回傳時無法重印問題
2. 發票左右QR Code大小不同問題
3. 商米讀卡大於0狀態碼問題
4. 無法在金流訂單列表頁查詢超過一個月以上的交易問題
0.2.7
3.9.0 2023-09-01 新增︰
藍牙串接MYPAY APP功能(20230901_120230901_2)
0.2.7
3.9.1 2023-09-06 新增︰
Web串接MYPAY APP功能(20230906_120230906_2)
0.2.7
3.9.3 2023-10-13 2023-10-26 新增︰
Cross App 39Buy登入回傳device id (20230927_1)

修正︰
1. 無法取得Provider問題
2. Cross App取得特店支援的支付方式為設備支援的支付方式(20230927_2)
3. TAP回傳與同步金流交易流程
4. TAP訂單明細頁訂單管理功能可使用條件
5. 一卡通同步金流相關問題
6. Cross App重印簽單多印一張問題
7. 藍牙設定頁Android 12以上設備閃退問題
0.2.8
4.0.0 2023-12-08 新增︰
1. 發票字軌設定頁可切換發票開立模式
2. 發票區間列表頁
3. 離線發票開立功能
4. Cross App金流交易使用發票時驗證統一編號、手機載具、自然人憑證
5. 設備取得發票號碼只能是當月或下個月的限制

修正︰
列印發票QR Code大小與商品資料過多問題
0.2.8
4.0.2 2024-01-15 新增︰
1. Cross App支援全盈支付線上和全支付線上
2. 一碼付切換使用者處理流程

修正︰
Cross Page使用錯誤的storeUid或userId未顯示錯誤訊息問題
0.2.9
4.0.3 2024-01-17 修正︰
1. userId驗證條件
2. 網路呼叫刷卡機重印簽單閃退問題
0.2.9
4.0.5 2024-02-07 新增︰
1. 自行收款設定頁面
2. Cross App取得自行收款設定
3. 發票開立模式設定頁
4. Flutter掃碼頁

修正︰
先登入MYPAY APP再登入一碼付流程問題

更新︰
發票字軌設定頁UI
0.3.0
4.0.7 2024-03-01 2024-03-04 新增︰
藍牙掃碼功能

修正︰
1. PayMode是否為信用卡的判斷
2. 海外信用卡交易列印問題
3. 金流訂單明細頁可更新交易狀態按鈕條件
4. 金流訂單明細頁第二次重印簽單只會印出商店存根問題
5. 金流訂單列表頁與MYPAY訂單列表頁搜尋交易結果無資料時列表不會更新問題

更新︰
1. 頁面名稱 (藍牙設定 -> 藍牙傳輸設定)
2. 掃碼功能使用ML Lib

刪除︰
Flutter掃碼頁
0.3.0
4.0.9 2024-03-21 2024-03-25 新增︰
1. 信用卡閘道設定錯誤提示訊息
2. 讀卡錯誤提示訊息

修正︰
1. 一碼付重登入未更新特店金鑰問題
2. 列印自行收款明細問題
3. 交易無法列印免用統一發票收據與農漁民收據問題
4. 金流訂單列表頁查詢一個月以上交易無反應問題
5. 信用卡交易使用手機載具會列印出發票問題
6. 行動支付頁左上返回鍵點下無反應問題
7. 掃碼收款取消掃碼時會出現無法顯示Dialog錯誤問題
8. 照機頁按下拍照後閃退問題

更新︰
顯示特店金鑰為前4後4碼
0.3.0

MYPAY TAP APP

版本號 測試更新日期 正式更新日期 異動 對應Lib版本
3.2.0 2022-08-10 修正︰
1. app launcher icon
2. SDK初始化錯誤問題
0.1.8
3.2.1 2022-08-23 0.1.8
3.2.2 2022-08-31 修正︰
1. TAP交易無紀錄itemList與orderTime問題
2. Cross App金流訂單列表與明細頁顯示TAP交易資料問題
0.1.8
3.2.5 2022-09-12 新增︰
1. Device ID資訊頁面
2. Cross App點餐單列表功能
3. Cross App發票管理功能
4. Cross App收據管理功能
5. Cross App印表機設定功能
6. Cross App交易回傳設定功能
7. 交易回傳結果多回傳一碼付echo

修正︰
1. 非卡機之一般裝置停在App進入頁問題
2. 印表機設定頁測試列印問題
3. 發票列印左右QR Code大小問題
4. QR Code線上交易頁QR Code位置
5. QR Code線上交易無發票時回應280問題
6. 部分頁面隱藏鍵盤問題
0.1.9
3.5.2 2023-03-28 2023-03-28 新增︰
1. Cross App一卡通交易功能
2. Cross App結班設定功能
3. 處理錯誤device id機制
4. 阻擋螢幕截圖功能
5. Device資訊頁可確認設備型號
6. 加密App敏感性資料
7. DB Migration進度更新頁面與流程
8. 驗證使用者輸入資料,並於輸入資料正確後才可點擊按鈕進行後續動作
9. 登入頁可選紀錄登入資訊
10. 特店金鑰過期提示
11. 支援一碼付合作夥伴API流程
12. Cross App取得特店支援的支付方式功能
13. 處理國外信用卡交易流程與警示
14. Cross App金流QR Code線上交易支援悠遊付
15. 金流訂單明細頁可更新交易狀態按鈕
16. 金流訂單明細頁顯示發票類型
17. Cross App結帳報表功能

修正︰
1. 交易回傳結果一碼付echo名稱問題
2. 訂單明細頁右方資料顯示問題
3. Cross App金流交易無法列印免用統一發票收據與農漁民收據問題
4. Cross App一卡通交易使用單一action
5. Cross App一卡通快速與離線詢卡未顯示錯誤訊息問題
6. Cross App一卡通連線詢卡未判斷order id問題 (不向下相容)
7. K2 MINI上掃描使用相機問題
8. 登入頁在部分設備上無法捲動問題
9. 未先登入MYPAY APP無顯示錯誤訊息問題
10. 發票字軌設定相關頁面無法捲動問題
11. 下拉式選單項目太小點擊異常問題
12. 登入頁輸入商務代號與登入帳號為可隱碼
13. 交易查詢改為先查詢Local DB資料而後才為Server端的資料
14. Cross App參數錯誤相對應的錯誤訊息
15. 判斷發票可列印的條件
16. 部分交易無法列印免用統一發票收據與農漁民收據問題
17. QR Code線上交易使用雲端發票參數卻會印出發票問題
18. QR Code線上交易列印發票錯誤問題
19. Local DB紀綠deviceId、一碼付echo、itemList為空值問題
20. 金流訂單列表頁以發票號碼查詢無包含時間條件問題
21. 金流訂單列表頁以發票號碼查詢無資料問題
22. 金流訂單明細頁參數錯誤時還可進行退款問題
23. 一碼付合作夥伴交易回傳條件
24. Cross App金流退款未傳入invoiceState參數問題
25. Local DB無交易時無法退款問題
26. 無法重印國外信用卡簽單問題
27. Cross App訂單查詢資料未完整問題
28. 收據管理頁無法拍照問題
29. 金流訂單明細頁訂單管理功能可使用條件
30. 印表機設定頁與API設定頁儲存和清除資料問題
31. Device資訊頁Android 10以上設備閃退問題
32. 金流交易與訂單明細頁可列印發票條件
33. 金流退款時發票選項為作廢
34. Cross App 39Buy登入頁鍵盤問題
35. Cross App取得特店支援的支付方式問題

更新︰
1. 保留Local DB交易區間(半年 -> 1個月)
2. 取得發票數量位數(4 -> 3)
3. 頁面名稱 (交易回傳設定 -> 合作夥伴URL設定)
4. MYPAY logo背景圖片
5. 新增發票區間頁與取得發票號碼頁UI
0.2.7
3.7.1 2023-06-15 2023-06-15 修正︰
1. QR Code線上交易頁面無法捲動問題
2. ViewUtils在Service顯示Toast會閃退問題
3. 39Buy取得商品明細缺少uid問題

更新︰
MYPAY訂單管理UI與搜尋功能
0.2.7
3.8.1 2023-08-02 2023-08-04 新增︰
1. 一卡通回傳金流交易流程
2. 結帳報表頁結帳時處理一卡通結班流程
3. TAP快速更新Token流程

修正︰
1. 金流訂單列表頁顯示一卡通退款失敗訊息
2. 一卡通交易儲存Local DB的資料格式
3. 商米M2 MAX上一碼付登入時停在主頁面問題
4. 信用卡交易頁面取消時回傳不正確的錯誤碼問題
5. 商米取得SN的程式
6. 取得閘道資料解析錯誤問題
7. TAP回傳金流交易流程

更新︰
39Buy登入頁登入權限

刪除︰
信用卡交易頁面顯示卡號與到期日的UI
0.2.7
3.9.2 2023-09-27 2023-10-05 新增︰
Cross App 39Buy登入回傳device id (20230927_1)

修正︰
1. 無法取得Provider問題
2. Cross App取得特店支援的支付方式為設備支援的支付方式(20230927_2)
3. TAP回傳與同步金流交易流程
4. TAP訂單明細頁訂單管理功能可使用條件
0.2.8
4.0.1 2023-12-27 新增︰
1. Cross App 39Buy登入回傳device id (20230927_1)
2. 發票字軌設定頁可切換發票開立模式
3. 發票區間列表頁
4. 離線發票開立功能
5. Cross App金流交易使用發票時驗證統一編號、手機載具、自然人憑證
6. 設備取得發票號碼只能是當月或下個月的限制
7. API呼叫可處理網路錯誤問題

修正︰
1. 無法取得Provider問題
2. Cross App取得特店支援的支付方式為設備支援的支付方式(20230927_2)
3. TAP回傳與同步金流交易流程
4. TAP訂單明細頁訂單管理功能可使用條件
5. 一卡通同步金流相關問題
6. Cross App重印簽單多印一張問題
7. 藍牙設定頁Android 12以上設備閃退問題
8. 列印發票QR Code大小與商品資料過多問題
9. JobService無法執行問題
10. 更新交易發票資訊API參數錯誤問題
11. 判斷商米印表機是否可用的條件
0.2.8
4.0.3 2024-01-17 新增︰
1. Cross App支援全盈支付線上和全支付線上
2. 一碼付切換使用者處理流程

修正︰
1. Cross Page使用錯誤的storeUid或userId未顯示錯誤訊息問題
2. userId驗證條件
3. 網路呼叫刷卡機重印簽單閃退問題
0.2.9
4.0.5 2024-02-07 新增︰
1. 自行收款設定頁面
2. Cross App取得自行收款設定
3. 發票開立模式設定頁
4. Flutter掃碼頁

修正︰
先登入MYPAY APP再登入一碼付流程問題

更新︰
發票字軌設定頁UI
0.3.0
4.0.6 2024-02-23 新增︰
藍牙掃碼傳輸功能
0.3.1