Comments (4)
Are you sure you have the accounts setup properly? like mentioned in the Paypal Sandbox & Accounts Setup section?
https://www.x.com/devzone/articles/iauction-adaptive-payments-tutorial-featuring-parallel-payments
from active_paypal_adaptive_payment.
Yeahh I have 2 seller account and 1 buyer account.
1 seller account for our app as merchant.
1 seller account for the service seller.
1 buyer account for the buyer.
I use the app_key for refund, this is my request:
def refund
.
.
gateway = ADAPTIVEPAYMENT_GATEWAY
pay_key = order.payment.pay_key # this **pay_key** is previously obtained on payment successfully.
response = gateway.refund(:pay_key => pay_key, :requestEnvelope => {"errorLanguage" => "en_US"})
logger.info response.inspect
.
.
.
end
This is response log:
#<ActiveMerchant::Billing::AdaptivePaymentResponse:0x000000092c20c8 @json="{\"responseEnvelope\":{\"timestamp\":
\"2012-09-21T09:37:48.402-07:00\",\"ack\":\"Success\",\"correlationId\":\"fb7ca06910768\",\"build\":\"3692562\"},\"currencyCode
\":\"USD\",\"refundInfoList\":{\"refundInfo\":[{\"receiver\":{\"amount\":\"9.00\",\"email\":\"[email protected]\"},
\"refundStatus\":\"NO_API_ACCESS_TO_RECEIVER\"},{\"receiver\":{\"amount\":\"1.00\",\"email\":
\"[email protected]\"},\"refundStatus\":\"NO_API_ACCESS_TO_RECEIVER\"}]}}",
@response=#<Hashie::Rash currency_code="USD" refund_info_list=#<Hashie::Rash refund_info=[#<Hashie::Rash
receiver=#<Hashie::Rash amount="9.00" email="[email protected]">
refund_status="NO_API_ACCESS_TO_RECEIVER">, #<Hashie::Rash receiver=#<Hashie::Rash amount="1.00"
email="[email protected]"> refund_status="NO_API_ACCESS_TO_RECEIVER">]>
response_envelope=#<Hashie::Rash ack="Success" build="3692562" correlation_id="fb7ca06910768"
timestamp="2012-09-21T09:37:48.402-07:00">>, @xml_request="<?xml version=\"1.0\" encoding=\"UTF-8\"?>
\n<RefundRequest>\n <requestEnvelope>\n <detailLevel>ReturnAll</detailLevel>\n <errorLanguage>en_US</
errorLanguage>\n </requestEnvelope>\n <actionType>REFUND</actionType>\n <payKey>AP-2GU25810BV3339547</
payKey>\n <currencyCode>USD</currencyCode>\n <feesPayer>EACHRECEIVER</feesPayer>\n</RefundRequest>\n",
@request={"RefundRequest"=>{"requestEnvelope"=>{"detailLevel"=>"ReturnAll", "errorLanguage"=>"en_US"},
"actionType"=>"REFUND", "payKey"=>"AP-2GU25810BV3339547", "currencyCode"=>"USD",
"feesPayer"=>"EACHRECEIVER"}}, @action="Refund">
Thank you very much!
from active_paypal_adaptive_payment.
Ok the problem was, For a receiver to grant permission to refund to the API Caller:
Login to www.paypal.com (For Sandbox: www.sandbox.paypal.com - Make sure you are already signed in https://developer.paypal.com) and login with the receiver account. Goto Profile -> API Access -> Grant API Permission -> Input the API Caller (Example: May6_1307031077_biz_api1.paypal.com) in Third Party Permission Username textbos and click Lookup button -> Enable checkbox for "Issue a refund for a specific transaction" and click Add button.
This is how receiver can grant permission to API Caller.
Once this is enabled, the refund should work.
Founded in https://www.x.com/developers/paypal/forums/adaptive-payments-api/adaptive-refund-notprocessed
But then The refund feature depend from seller if have this feature enabled on his paypal account... This is a big problem because the merchant can not make a refund if the seller has this feature disabled...
For fix this problem you can Granting API Permissions via the API
You can see on https://www.x.com/devzone/articles/paypal-permissions-and-advantages-integrating-permissions-api
you can try it with gem https://github.com/moshbit/paypal_permissions
Thank you very much!
from active_paypal_adaptive_payment.
Hi,
I am having the same issue as you were having but I couldn't figure out how to get the refund to work with sandbox accounts. When I issue a general refund when I don't specify the sender the order get's refunded by both secondary receivers, but when I specify one of the original secondary receivers to issue the refund I get "'NO_API_ACCESS_TO_RECEIVER"
I tried using the Grant API Permissions form as you suggested but the issue is I don't know what username to enter as I am testing with accounts created by my sandbox developer paypal form and I only have email addresses there but the grant permissions for Lookup returns "Please enter valid API username."
Could you point me in the right direction? Thanks.
from active_paypal_adaptive_payment.
Related Issues (20)
- What parameters does paypal send back when it redirects to my site? HOT 4
- Not receiving a response from the IPN when ipn_notification_url is called HOT 3
- :start_time and :end_time for preapproved payments do not include GMT offset HOT 2
- This transaction is invalid. Please return to the recipient's website and try again. HOT 5
- Inconsistent naming of IPN keys HOT 3
- its possible send ClientDetails Fields? HOT 3
- payment is completed without the sender logging in to paypal.com HOT 1
- No ipn field provided for preapprove_payment HOT 1
- How to send a single payment to a single user? HOT 1
- How to send an implicit approval payment?
- Setting the item description for the Payee HOT 2
- payKey issue HOT 5
- Embedded payment not working?
- Chained payments not working?
- how i implement this in rails app
- item description, support for Embedded flow?
- Your tutorial video link does not work
- Set payments as "Family and friends"
- Adaptive Payment Refund functionality Issue The refund's Error receiver [email protected] wasn't part of the payment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from active_paypal_adaptive_payment.