Note that there are some explanatory texts on larger screens.

plurals
  1. POGet first_name (and other info) from Paypal and create Rails Devise account using paypal-recurring gem
    primarykey
    data
    text
    <p>I have create the basics of subscription Paypal using <a href="http://railscasts.com/episodes/289-paypal-recurring-billing" rel="nofollow noreferrer">the RailsCast</a> and now I'm doing what is missing there.</p> <p>Now I'm developing the process to do the Devise user registration together/just after the payment is done. For now, I'm trying something like <a href="https://stackoverflow.com/questions/17131395/ruby-on-rails-two-models-in-one-form">this</a> and <a href="https://stackoverflow.com/questions/18564224/how-to-use-rails-build-to-create-a-user-with-a-stripe-subscription">this</a>.</p> <p>As <a href="http://railscasts.com/episodes/289-paypal-recurring-billing" rel="nofollow noreferrer">the RailsCast</a> got the e-mail from PayPal using this line:</p> <pre><code>@subscription.email = PayPal::Recurring.new(token: params[:token]).checkout_details.email </code></pre> <p>So, I thought that I could get first name, middle name and last name from PayPal as well. From <a href="https://developer.paypal.com/docs/classic/api/merchant/GetExpressCheckoutDetails_API_Operation_NVP/" rel="nofollow noreferrer">PayPal documentation</a> it seems that it is possible but I couldn't get it through paypal-recurring gem. I have tried to see if I can learn what I have to do from <a href="https://github.com/fnando/paypal-recurring" rel="nofollow noreferrer">paypal-recurring GitHub</a> docs and code but I couln't find and tried some possibilities without success.</p> <p>Is it possible? Maybe in another way not using paypal-recurring gem?</p> <p>If you have another recomendation/reference to do this registration process, please, let me know.</p> <p><strong>Update</strong></p> <p>As @Andrew suggested PayPal IPN, I thought it would be better update my question as I want to have the first_name from PayPal as a default value to ease the process to the user register in my database but he or she may want to change to another name. </p> <p>The process that I want is something like:</p> <ol> <li>The user chooses his plan and to pay with PayPal</li> <li>User is sent to PayPal</li> <li>User fills payment info on PayPal site</li> <li>User is sent again to my site</li> <li>My site gets e-mail and name of the user from PayPal and asks the user to confirm or change the data, and provide his password to create the login to my site</li> <li>My site uses the user data provided to register the user and sends the request to PayPal to request the payment and create the recurring profile</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload