简体   繁体   English

Authorize.net C#API。 退还Pay Pal交易

[英]Authorize.net C# API. Refund Pay Pal transaction

I use authprize.net for auth, capture -> auth, capture continue Pay Pal payment transactions. 我使用authprize.net进行auth, capture -> auth, capture continue Pay Pal付款交易。 I need to get original Pay Pal unique transaction ID (not authprize.net). 我需要获取原始的Pay Pal唯一交易ID(而不是authprize.net)。 It's an ideal way for our system, because client has code for refund Pay Pal transactions using this original pay pal Id. 这是我们系统的理想方式,因为客户具有使用此原始Pay pal ID进行Pay Pay退款的交易代码。 What I tried: 我试过的

 ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX;               
            ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType()
            {
                name = _apiLogin,
                ItemElementName = ItemChoiceType.transactionKey,
                Item = _transactionKey,
            };
            var request = new getTransactionDetailsRequest();
            request.transId = transactionId;
            var controller = new getTransactionDetailsController(request);
            controller.Execute();
            var response = controller.GetApiResponse();

But I only see general info like date or amount, etc. Then I tried to refund Pay Pal transaction using this code sample: http://developer.authorize.net/api/reference/index.html#paypal-express-checkout-credit But I received an error: http://prntscr.com/d5rong For this code I used authorize.net internal ID too. 但是我只看到常规信息,例如日期或金额等。然后,我尝试使用以下代码示例退款Pay Pal交易: http : //developer.authorize.net/api/reference/index.html#paypal-express-checkout-信用,但是我收到一个错误: http : //prntscr.com/d5rong对于此代码,我也使用了authorize.net内部ID。 I have to say that I tried in sandbox. 我不得不说我在沙盒中尝试过。 So, what am I doing wrong? 那么,我在做什么错呢? Could anyone, please, explain and provide example? 任何人都可以解释并提供示例吗?

Referencing your comment "Yes. But I did sandbox transactions", per PayPal Express Checkout feature overview: 根据PayPal Express Checkout功能概述,引用您的评论“是的,但是我进行了沙箱交易”:

As the Sandbox does not permit settlement of PayPal transactions, you will not be able to test refunds. 由于沙盒不允许结算PayPal交易,因此您将无法测试退款。

https://developer.authorize.net/api/reference/features/paypal.html https://developer.authorize.net/api/reference/features/paypal.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM