Coder Social home page Coder Social logo

Comments (3)

jpablobr avatar jpablobr commented on June 8, 2024

Hey thanks! I think this might help with:

#31

😄

from active_paypal_adaptive_payment.

hyperrjas avatar hyperrjas commented on June 8, 2024

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.

jpablobr avatar jpablobr commented on June 8, 2024

Fixed: https://github.com/jpablobr/active_paypal_adaptive_payment#pre-approved-payment
Thanks!

from active_paypal_adaptive_payment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.