我用 C#调用进程DoReferenceTransaction (SOAP) 。它运行良好,数据到达并且结果DoReferenceTransactionResponseType
没有错误。但细节DoReferenceTransactionResponseDetails
永远是空的。
是否有任何变量可以填充响应中的详细信息?我在其中找到了一个 XML 字符串,DoReferenceTransactionResponseDetails.Any
但如果它在其中,为什么我要从 xml 中排除数据DoReferenceTransactionResponseDetails
?
我必须拥有的是TransactionID
来自 PayPal 的。
谢谢
请求示例:
request = new DoReferenceTransactionReq();
request.DoReferenceTransactionRequest = new DoReferenceTransactionRequestType();
request.DoReferenceTransactionRequest.Version = "98.0";
request.DoReferenceTransactionRequest.DoReferenceTransactionRequestDetails = new DoReferenceTransactionRequestDetailsType();
request.DoReferenceTransactionRequest.DoReferenceTransactionRequestDetails.PaymentAction = PaymentActionCodeType.Sale;
request.DoReferenceTransactionRequest.DoReferenceTransactionRequestDetails.PaymentType = MerchantPullPaymentCodeType.Any;
request.DoReferenceTransactionRequest.DoReferenceTransactionRequestDetails.PaymentDetails = new PaymentDetailsType();
request.DoReferenceTransactionRequest.DoReferenceTransactionRequestDetails.PaymentDetails.OrderTotal = new BasicAmountType();
request.DoReferenceTransactionRequest.DoReferenceTransactionRequestDetails.PaymentDetails.OrderTotal.Value = "100";
request.DoReferenceTransactionRequest.DoReferenceTransactionRequestDetails.PaymentDetails.OrderTotal.currencyID = CurrencyCodeType.CHF;
request.DoReferenceTransactionRequest.DoReferenceTransactionRequestDetails.ReferenceID = "XXXX";
DoReferenceTransactionResponseType response = service.DoReferenceTransaction(request);
交易已成功处理,我可以在贝宝沙盒的页面概述中看到它。