USAePay 使用 REST API 为客户创建付款方式,但沙盒不起作用 - PHP

问题描述 投票:0回答:1

我在创建付款方式时找不到指定的源密钥,但我能够收集付款方式。仅当我尝试创建新问题时才会出现此问题。所有其他端点都工作正常。我正在沙盒环境中测试所有内容。

基本网址将是 https://sandbox.usaepay.com/api/v2

为客户创建付款方式的完整端点将是发布请求https://sandbox.usaepay.com/api/v2/customers/isddxhkfcwxq2663/ payment_methods

API::setAuthentication('my_key','my_pin');

        info(API::ping());

        $request=[
            "custkey"=>"isddxhkfcwxq2663",
            "CustomerPaymentMethodRequests"=>[
                [
                    "expiration"=>"0924",
                    "number"=>"4000100011112224",
                    "pay_type"=>"cc",
                ],
            ],
        ];

        $response = Payment_methods::post($request);

        return $response;

我尝试发布请求来创建客户付款方式,但收到指定的源密钥未找到消息

php payment-gateway payment-method usaepay
1个回答
0
投票

您需要创建 Bearer 令牌 此链接可能有帮助: https://help.usaepay.info/api/rest/?shell#authentication

© www.soinside.com 2019 - 2024. All rights reserved.