我正在尝试使用以下数据向Simulator端点(https://test.sagepay.com/Simulator/VSPDirectGateway.asp)发出购买请求:
array(35) { ["VPSProtocol"]=> string(4) "2.23" ["TxType"]=> string(7) "PAYMENT" ["Vendor"]=> string(9) "MY VENDOR NAME" ["AccountType"]=> string(1) "E" ["Description"]=> string(13) "My Test Order" ["Amount"]=> string(4) "1.50" ["Currency"]=> string(3) "GBP" ["VendorTxCode"]=> string(1) "3" ["ClientIPAddress"]=> NULL ["ApplyAVSCV2"]=> int(0) ["Apply3DSecure"]=> int(0) ["BillingFirstnames"]=> string(3) "Sam" ["BillingSurname"]=> string(4) "King" ["BillingAddress1"]=> string(1) "1" ["BillingAddress2"]=> string(1) "2" ["BillingCity"]=> string(8) "Brighton" ["BillingPostCode"]=> string(3) "BN1" ["BillingState"]=> string(0) "" ["BillingCountry"]=> string(2) "GB" ["BillingPhone"]=> NULL ["DeliveryFirstnames"]=> NULL ["DeliverySurname"]=> NULL ["DeliveryAddress1"]=> NULL ["DeliveryAddress2"]=> NULL ["DeliveryCity"]=> NULL ["DeliveryPostCode"]=> NULL ["DeliveryState"]=> string(0) "" ["DeliveryCountry"]=> NULL ["DeliveryPhone"]=> NULL ["CustomerEMail"]=> NULL ["CardHolder"]=> string(8) "Sam King" ["CardNumber"]=> string(16) "4012888888881881" ["CV2"]=> string(3) "123" ["ExpiryDate"]=> string(4) "0215" ["CardType"]=> string(4) "visa" }
然而,我一再拒绝从Sagepay回来是一个验证错误:
“CardHolder字段的长度应介于1到50个字符之间。”
但是,正如你在上面的数据数组中看到的那样,我发送的CardHolder值为'Sam King',显然是1到50个字符。
作为参考,我正在使用Omnipay(https://github.com/thephpleague/omnipay)库来发出请求。
知道我在这里做错了什么吗?