我已经使用SagePay V3及其IntegrationKit通过C#实现了结帐。付款效果很好,并显示在MySagePay的测试区域中。但是,将PaymentType更改为“ DEFERRED”无效。
执行我的付款请求:
sagePayFormIntegration.ProcessRequest(request);
请求对象:
{
"FiRecipientAccountNumber":null,
"FiRecipientDateOfBirth":null,
"FiRecipientPostCode":null,
"FiRecipientSurname":null,
"VpsProtocol":1,
"TransactionType":2,
"Vendor":"XXXXXXXXXXX",
"VendorTxCode":"club-1547210802856-618854",
"Amount":117.6,
"Currency":"GBP",
"Description":"Order - XXXX",
"CardHolder":null,
"CardNumber":null,
"StartDate":null,
"ExpiryDate":null,
"IssueNumber":null,
"Cv2":null,
"CardType":0,
"BillingSurname":"Blue",
"BillingFirstnames":"Alan",
"BillingAddress1":"91 Templeton road",
"BillingAddress2":"",
"BillingCity":"Edinburgh",
"BillingPostCode":"B449DA",
"BillingCountry":"GB",
"BillingState":null,
"BillingPhone":"123456789",
"DeliverySurname":"Blue",
"DeliveryFirstnames":"Alan",
"DeliveryAddress1":"91 Templeton road",
"DeliveryAddress2":"a",
"DeliveryCity":"Edinburgh",
"DeliveryPostCode":"B449DA",
"DeliveryCountry":"GB",
"DeliveryState":null,
"DeliveryPhone":null,
"PayPalCallbackUrl":null,
"CustomerEmail":"hello@test.co.uk",
"Basket":null,
"GiftAidPayment":null,
"ApplyAvsCv2":1,
"ClientIpAddress":null,
"Apply3dSecure":1,
"AccountType":null,
"BillingAgreement":"",
"Status":0,
"StatusDetail":null,
"VpsTxId":null,
"SecurityKey":null,
"TxAuthNo":0,
"AvsCv2":null,
"Cavv":null,
"Md":null,
"AcsUrl":null,
"PaReq":null,
"PaRes":null,
"PayPalRedirectUrl":null,
"AddressStatus":null,
"PayerStatus":null,
"PayerId":null,
"Accept":null,
"Crypt":null,
"SuccessUrl":"https://www.test.com",
"FailureUrl":"https://www.test.com",
"CustomerName":"Alan Blue order",
"VendorEmail":"lorraine@test.co.uk",
"EmailMessage":"Thank you for your payment",
"AllowGiftAid":0,
"Last4Digits":null,
"RelatedVpsTxId":null,
"RelatedVendorTxCode":null,
"RelatedSecurityKey":null,
"RelatedTxAuthNo":0,
"SendEmail":1,
"ReferrerId":"",
"NotificationUrl":null,
"Profile":null,
"NextUrl":null,
"ReleaseAmount":0,
"GiftAid":0,
"VpsSignature":null,
"AddressResult":0,
"PostCodeResult":0,
"Cv2Result":0,
"ThreeDSecureStatus":0,
"RedirectUrl":null,
"Token":null,
"SurchargeXml":"",
"CreateToken":0,
"BasketXml":null,
"Surcharge":null,
"DeclineCode":null,
"BankAuthCode":null,
"FraudResponse":0,
"VendorData":"",
"CustomerXml":null,
"StoreToken":0
}
最重要的是,请注意TransactionType是2(递延)..而不是1(付款)。 TransactionType是一个枚举,是SagePay集成工具包的一部分。我使用下面的函数获取transactionType:
public static TransactionType DeferredTransactionType
{
get
{
return (TransactionType) Enum.Parse(typeof(TransactionType), GetValue("DEFERRED"));
}
}
任何想法,无论我将TransactionType设置为什么,为何交易都将作为“付款”进行?