Comments (3)
Hey thanks! I think this might help with:
from active_paypal_adaptive_payment.
I have this request but it does not work fine for me with :notify_url :
response = gateway.preapprove_payment(
:return_url => user_orders_url(current_user),
:cancel_url => user_orders_url(current_user),
:requestEnvelope => {"errorLanguage" => "en_US"},
:senderEmail =>"email",
:start_date => Time.now,
:end_date => Time.now + (60*60*24) * 30,
:currency_code =>"USD",
:max_amount => "20.00",
:maxNumberOfPayments => "1",
:notify_url => ipn_notification_user_orders_url(current_user),
)
# for redirecting the customer to the actual paypal site to finish the payment.
redirect_to (gateway.redirect_url_for(response["preapprovalKey"]))
p response
This is my response output:
#<ActiveMerchant::Billing::AdaptivePaymentResponse:0xda2d3f4 @json="{\"responseEnvelope\":{\"timestamp\":\"2012-07-24T02:47:38.347-07:00\",\"ack\":\"Success\",\"correlationId\":\"4bae8c7434f9d\",\"build\":\"DEV\"},\"preapprovalKey\":\"PA-5YG488225P076813Y\"}", @response=#<Hashie::Rash preapproval_key="PA-5YG488225P076813Y" response_envelope=#<Hashie::Rash ack="Success" build="DEV" correlation_id="4bae8c7434f9d" timestamp="2012-07-24T02:47:38.347-07:00">>, @xml_request="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<PreapprovalRequest>\n <requestEnvelope>\n <detailLevel>ReturnAll</detailLevel>\n <errorLanguage>en_US</errorLanguage>\n <senderEmail>email</senderEmail>\n </requestEnvelope>\n <endingDate>2012-08-23T11:47:36</endingDate>\n <startingDate>2012-07-24T11:47:36</startingDate>\n <maxTotalAmountOfAllPayments>20.00</maxTotalAmountOfAllPayments>\n <maxNumberOfPayments>1</maxNumberOfPayments>\n <currencyCode>USD</currencyCode>\n <cancelUrl>http://localhost:3000/en/u/maserranocaceres/orders</cancelUrl>\n <returnUrl>http://localhost:3000/en/u/maserranocaceres/orders</returnUrl>\n <ipnNotificationUrl>http://localhost:3000/en/u/maserranocaceres/orders/ipn_notification</ipnNotificationUrl>\n</PreapprovalRequest>\n", @request={"PreapprovalRequest"=>{"requestEnvelope"=>{"detailLevel"=>"ReturnAll", "errorLanguage"=>"en_US", "senderEmail"=>"[email protected]"}, "endingDate"=>"2012-08-23T11:47:36", "startingDate"=>"2012-07-24T11:47:36", "maxTotalAmountOfAllPayments"=>"20.00", "maxNumberOfPayments"=>"1", "currencyCode"=>"USD", "cancelUrl"=>"http://localhost:3000/en/u/maserranocaceres/orders", "returnUrl"=>"http://localhost:3000/en/u/maserranocaceres/orders", "ipnNotificationUrl"=>"http://localhost:3000/en/u/maserranocaceres/orders/ipn_notification"}}, @action="Preapproval">
Where have I the error?
from active_paypal_adaptive_payment.
Fixed: https://github.com/jpablobr/active_paypal_adaptive_payment#pre-approved-payment
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
- 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
- Refund method NO_API_ACCESS_TO_RECEIVER HOT 4
- 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.