简体   繁体   中英

Authorize.net C# API. Refund Pay Pal transaction

I use authprize.net for auth, capture -> auth, capture continue Pay Pal payment transactions. I need to get original Pay Pal unique transaction ID (not 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. 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. 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:

As the Sandbox does not permit settlement of PayPal transactions, you will not be able to test refunds.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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