Hi all What i want to do is that I want to integrate my site with paypal (which i have already done) but the problem i m facing is that i have a email address field which i m getting from the user..now after the user fills out the detail and click on subscribe it will be redirected to paypal site for making payment.. Now the problem here is that i want to store the email in my db once the payment is successfully done so that i can come to know that who has actually paid for the subscription.. So has any one implemented this? IF so pls send me the code..I need to do it.. Thanks a lot -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 15, 2008, at 9:38 PM, Dhaval Parikh wrote:> > Hi all > > What i want to do is that I want to integrate my site with paypal > (which > i have already done) but the problem i m facing is that i have a email > address field which i m getting from the user..now after the user > fills > out the detail and click on subscribe it will be redirected to paypal > site for making payment.. > > Now the problem here is that i want to store the email in my db > once the > payment is successfully done so that i can come to know that who has > actually paid for the subscription.. > > So has any one implemented this? IF so pls send me the code..I need to > do it.. >Not sure if this is exactly what you''re after, but I have a site that does payment and donation processing on PayPal, and when the user comes back from PayPal, there is a boat load of params sent back. One of them is the email address the payer used on PayPal. Peace, Phillip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Koebbe wrote:> On Feb 15, 2008, at 9:38 PM, Dhaval Parikh wrote: > >> >> Now the problem here is that i want to store the email in my db >> once the >> payment is successfully done so that i can come to know that who has >> actually paid for the subscription.. >> >> So has any one implemented this? IF so pls send me the code..I need to >> do it.. >> > > Not sure if this is exactly what you''re after, but I have a site that > does payment and donation processing on PayPal, and when the user > comes back from PayPal, there is a boat load of params sent back. > One of them is the email address the payer used on PayPal. > > Peace, > Phillipyes i guess its the same i want the paypal site to redirect back to my site and then store the email address in the db.. can u pls provide me the code..and ur site url so that i can clear out the concept.. I would be really thankful if u can do the same thanks a lot dhaval parikh -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Look up activemerchant integrations? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Roger Pack wrote:> Look up activemerchant integrations?there r number of plugins which i have seen but wat i guess is that the code provide by paypal for the devt can also do the trick directly.. Have you implemented active merchant plugin?? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 15, 2008, at 11:18 PM, Dhaval Parikh wrote:> yes i guess its the same i want the paypal site to redirect back to my > site and then store the email address in the db.. > > can u pls provide me the code..and ur site url so that i can clear out > the concept.. >When you submit the form to PayPal, you need to include "return" and "cancel_return" so PayPal knows where to send the user once they''re either finished or cancel the process. The successful return is done by a button on the PayPal side and it makes a POST to your "return" URL, so that truckload of parameters is not visible to the naked eye. I believe there is a setting in your PayPal account that can disable that part of it. It''s been a month or two since I coded that. The site isn''t live just yet, so I can''t give out the URL. But all of this is in the documentation for interacting with PayPal''s Web Payments Standard (I think that''s what it''s called). Phillip --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
+1 for ActiveMerchant It was developed by/for the Shopify guys and is more than adequate for the job. On Feb 16, 12:19 am, Roger Pack <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Look up activemerchant integrations? > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 16, 2008 1:09 PM, AndyV <arv7-HmMyXyqgL2CVc3sceRu5cw@public.gmane.org> wrote:> > +1 for ActiveMerchant > It was developed by/for the Shopify guys and is more than adequate for > the job. > > On Feb 16, 12:19 am, Roger Pack <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > Look up activemerchant integrations?And since we''re talking about paypal subscriptions here this might be useful: http://talklikeaduck.denhaven2.com/articles/2007/09/02/how-to-cure-the-paypal-subscription-blues -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
yes thats wat i want but i m not able to find out that how it will return to my site once the payment is done..Can u send me the complete code for paypal and RoR so that i can implement is by making necessary changes in my application?? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello, You can do that : Here''s my sharing script /models/order.rb: def process if clossed? raise "Order is closed" begin process_with_active_merchant rescue => e logger.errror("Order #{id} faild with errir message #{e}") self.error_message = "Error while processing order" self.status = "failed" end save! self.status == ''processed'' end def process_with_active_merchant Base.gateway_mode = :test gateway = PayPalGateway.new( :login => ''business_account_login'', :password => ''business_account_password'', :cert_path => File.join(File.dirname(_FILE_), "../../config/paypal")) gateway.connection.wiredump_dev = STDERR creditcard = CreditCard.new( ... ) #Buyer Information params = { :order_id => self.id :email => email, :address => { ..bla..bla..bla.}, :description => ''Books'', :ip => customer_ip } response = gateway.purchase(total, creditcard, params) if response.success? self.status = ''processed'' # put your script here to save customer email and information else self.error_message = responce.message self.status =''failed'' end end *~*~*~*~*~**~*~*~*~*~* Reinhart Ariando YM : Booking2Heaven WEB : http://teapoci.blogspot.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
yeh thats perfect when we implement active merchant..but i guess paypal gives direct facility using their own code to redirect to our site and then we just need to call one method by which the details filled in will be inserted to the db. something like the one u have give on_successful_payment do { blah blah } -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I think you not read my script carefully, see this : #Buyer Information params = { :order_id => self.id :email => email, :address => { ..bla..bla..bla.}, :description => ''Books'', :ip => customer_ip } response = gateway.purchase(total, creditcard, params) if response.success? self.status = ''processed'' # put your script here to save customer email and information else Look to my comment area, What i give you is how to process order using PayPal API, once transaction success, paypal will respond back to your website and store it to your database, even your customer''s credit card if your customer is new customer in paypal. If they are existing customer in paypal, your customer only uses email and their paypal login. After order complete, their login will be sent back to you. But customer detail like address, bank account and credit card in paypal can not be sent back to you because it is already recorded in paypal. If you are PHP expert, you can use curl php to hack PayPal so you can exploit or show all your customer''s detail (bill addr, acct, and card info) using their login only. It''s easy as long as paypal doesnt know what you do or they will patch your way. *~*~*~*~*~**~*~*~*~*~* Reinhart Ariando YM : Booking2Heaven WEB : http://teapoci.blogspot.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---