<?php
namespace App\Helper\UniPlatform\Bytedance;

use App\Helper\UniPlatform\BaseAPI;

define('BASE_URL','https://developer.toutiao.com/api/apps/v2');
define('PAY_URL','https://developer.toutiao.com/api/apps');
final class ByteDanceAPI extends BaseAPI
{


    /**
     * 获取 ACCESS_TOKEN
     * @url https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/interface-request-credential/get-access-token
     */
    const ACCESS_TOKEN = BASE_URL.'/token';

    /**
     * 登陆
     * @url https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/log-in/code-2-session
     */
    const LOGIN = BASE_URL.'/jscode2session';

    /**
     * 支付下单
     * @url https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/ecpay/introduction
     */
    const CREATE_ORDER = PAY_URL.'/ecpay/v1/create_order';

    /**
     * 订单同步
     * @url https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/order/order-sync/
     */
    const ORDER_PUSH = PAY_URL.'/order/v2/push';
}
