Sagepay Pi-错误:3364一次性令牌不支持文件卡

问题描述

我目前正在构建一个包含SagePay Pi的支付解决方案,以生成并希望存储令牌化的卡详细信息。

我已经成功创建了付款流程:用户输入卡详细信息>使用Sagepay JS库进行令牌化>交易创建> 3D安全(如果需要)>已付款

尽管我尝试指定在交易阶段应保存令牌,但它会返回以下错误:

[statusCode] => 3364
[statusDetail] => Card on File is not supported for one time tokens.
[transactionId] => XXXXXXXXXXXXXXXX
[transactionType] => Deferred
[fiRecipient] => stdClass Object
(
)
[status] => Invalid
[http_code] => 422
[response_header] => HTTP/1.1 100 Continue

我已尝试查找导致此错误的原因,但缺少相关文档!其他任何人以前都遇到过此错误,并找到了解决方案吗?

根据文档(https://pi-test.sagepay.com/api/v1/transactions)发送到端点(https://developer.sage.com/api/payments/api/#operation/createTransaction)的完整负载是:

[transactionType] => DEFERRED
[paymentMethod] => Array
    (
        [card] => Array
            (
                [merchantSessionKey] => XXXXXXXXXXXXXXXX
                [cardIdentifier] => XXXXXXXXXXXXXXXX
                [reusable] => false
                [Save] => true
            )

    )

[apply3DSecure] => Force
[applyAvsCvcCheck] => UseMSPSetting
[credentialType] => Array
    (
        [cofUsage] => First
        [initiatedType] => CIT
        [mitType] => Unscheduled
    )

[vendorTxCode] => XXXXXXXXXXXXXXXX
[amount] => 2075
[currency] => GBP
[description] => XXXXXXXXXXXXXXXX
[entryMethod] => Ecommerce
[customerEmail] => XXXXXXXXXXXXXXXX
[strongCustomerAuthentication] => Array
    (
        [notificationURL] => http://127.0.0.1/checkout/
        [browserIP] => 127.0.0.1
        [browserAcceptHeader] => text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
        [browserJavascriptEnabled] => 1
        [browserJavaEnabled] => 
        [browserLanguage] => en-US
        [browserColorDepth] => 24
        [browserScreenHeight] => 1080
        [browserScreenWidth] => 1920
        [browserTZ] => 0
        [browserUserAgent] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/86.0.4240.80 Safari/537.36
        [challengeWindowSize] => FullScreen
        [transType] => GoodsAndServicePurchase
    )

[customerFirstName] => XXXXXXXXXXXXXXXX
[customerLastName] => XXXXXXXXXXXXXXXX
[billingAddress] => Array
    (
        [address1] => XXXXXXXXXXXXXXXX
        [city] => XXXXXXXXXXXXXXXX
        [postalCode] => XXXXXXXXXXXXXXXX
        [country] => GB
    )

[shippingDetails] => Array
    (
        [recipientFirstName] => XXXXXXXXXXXXXXXX
        [recipientLastName] => XXXXXXXXXXXXXXXX
        [shippingAddress1] => XXXXXXXXXXXXXXXX
        [shippingCity] => XXXXXXXXXXXXXXXX
        [shippingPostalCode] => XXXXXXXXXXXXXXXX
        [shippingCountry] => GB
    )

任何帮助将不胜感激!

解决方法

从Sagepay来回发送了几封电子邮件之后,初始请求中的“ [保存] => true”应该是“ [保存] => true”(小写s),这就是导致3364错误的原因。

要启用存储令牌化卡的功能,还需要在您的Sagepay帐户上添加一个标志,该标志只能在电话后由Sagepay支持人员应用。

对于任何通过Sagepay Pi保存令牌卡的问题,可能是由于您的帐户缺少必需的标志,所以请尝试给Sagepay打电话!

他们的联系方式可以在这里找到:https://www.opayo.co.uk/contact-us

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...