Magento Forum

PayPal in Magento is leaving much to be desired.  How can I integrate my own PHP classes and use my own PayPal processing scripts? 
 
angelleye
Member
 
Avatar
Total Posts:  45
Joined:  2009-02-09
Kansas City, MO
 

I installed Magento 1.2.1.1 and added some products into it.  I absolutely LOVE everything I see until I get to the PayPal checkout procedure.

Neither Payments Pro (direct payment) or Express Checkout pass any cart details to PayPal.  It doesn’t separate shipping, handling, sales tax accordingly.  It just sends “Total” to PayPal with the complete order total.  I understand it does include an invoice number and you can look up those details in your Magento admin, but still, PayPal could be much more tightly integrated without much trouble.  The actual Express Checkout process for PayPal isn’t very good at.

No matter whether you set useraction=commit or useraction=continue it still shows you a Review page back on the Magento site and asks you click a final Place Order button.  Also, for some reason the shipping gets doubled once you reach this point.

When I test standard PayPal it works the first time but after that I’m stuck with an error upon redirection to PayPal that the invoice has already been paid for.  This is even after closing down the browser and re-trying, and then switching browsers completely.  It still seems to grab the old data when I logged in to checkout.

I’m a certified PayPal developer (one of only 13 Ace developers) and I’ve written my own class set for PayPal that is much more tightly integrated than what is currently in Magento.  How can I integrate my own class into Magento and use my own PayPal processing pages?

Any information on this would be greatly appreciated.  Thanks!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

Slagging the official code and then asking for help may not be the best approach but why don’t you download a few custom payment methods and see the file structures there? There’s also a wiki on coding your own payment methods.

Of course after such an introduction, we all expect to see your wonderful solution up for free download in a couple of weeks too!

 
Magento Community Magento Community
Magento Community
Magento Community
 
angelleye
Member
 
Avatar
Total Posts:  45
Joined:  2009-02-09
Kansas City, MO
 
J.T. - 06 March 2009 04:05 PM

Slagging the official code and then asking for help may not be the best approach but why don’t you download a few custom payment methods and see the file structures there? There’s also a wiki on coding your own payment methods.

Of course after such an introduction, we all expect to see your wonderful solution up for free download in a couple of weeks too!

Heh, sorry.  Didn’t mean to sound like an ass or anything.  I guess that’s kinda what I did, though. Didn’t mean to dis-respect. 

If I can figure out how to get it integrated I will surely post it for free.  I also have a complete IPN solution that handles everything IPN does from orders, ebay checkouts, refunds, disputes, subscriptions, recurring payments, etc.  I’d be happy to integrate that as well. 

Again, I apologize if I sounded disrespectful.  Wasn’t my intention.  It wouldn’t take much at all to more tightly integrate PayPal, though, so it just a little interesting to me that it was left so basic and seems to contain some problems. 

For now I turned off Express Checkout and I just enabled Payments Pro with Standard PayPal.  That’ll hopefully take care of PayPal’s requirement that you include EC with Payments Pro (even though it’s not technically EC). 

Anyway, I’ll do what you said and check out some other custom payment methods.  Thanks!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andy Bala
Jr. Member
 
Total Posts:  11
Joined:  2009-02-02
 

Hi,

Right now I’m using the Paypal website payment standard for my client, so when a user checks out, the control goes to the paypal website and after completing the transaction comes back to the original website. This seems to work well.

But what I would like to know is if there is any other way to integrate the paypal payment similar to the authorize.net payment, where the control always stays within the website and the payment can be completed, something like a request / response method. The paypal ID & password of the user should be obtained in our website itself. I’m not sure if this functionality is available with paypal and/or if a custom module needs to be written for Magento to do this kind of a transaction.

Can someone help? Also please let me know if I need to provide a more clearer picture of my requirement. Thanks.

Best,

Andy

 
Magento Community Magento Community
Magento Community
Magento Community
 
angelleye
Member
 
Avatar
Total Posts:  45
Joined:  2009-02-09
Kansas City, MO
 

What you’re referring to is PayPal Payments Pro.  You have to sign up for Pro with PayPal and then you can use it if you’re approved.  It allows you to process cards directly on your site without the buyer even knowing PayPal was involved.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cbsteven
Member
 
Total Posts:  73
Joined:  2008-07-25
 

I don’t think the original poster sounded disrespectful at all. In fact he was rather effusive in his politeness.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andy Bala
Jr. Member
 
Total Posts:  11
Joined:  2009-02-02
 

@angeleye

Hi,

I think PayPal Payments Pro requires the user to input their credit card info, right? But, what I was wanting to do is to get the user’s PayPal U/N and Password on our website and pass them to PayPal as a request and process the reponse from their site, etc. Do you think that is doable?

Basically, I’m just looking for a more tightly coupled integration. The reason is because, right now, if the user does not complete or closes the browser window before the transaction is complete, Magento put the order status as PayPal pending and this is kind of confusing because, we are not sure, if the user has purposefully aborted the transaction or if an error has occured.

Do let me know if I’m not clear.

Thank you.

Andy

 
Magento Community Magento Community
Magento Community
Magento Community
 
angelleye
Member
 
Avatar
Total Posts:  45
Joined:  2009-02-09
Kansas City, MO
 

Well, you’re confusing me a little bit.  Payments Standard would do what you want.  Express Checkout is the API method of doing that, however, it’s not very well integrated into Magento right now which is one of the reasons I originally posted this thread.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andy Bala
Jr. Member
 
Total Posts:  11
Joined:  2009-02-02
 

Hi Angeleye,

Sorry about the confusing part. grin

What I’m trying to achieve is that the user inputs the username & password of his paypal account in our website itself (instead of the browser redirecting to the paypal site) and process the order on our own website. That’s in a nutshell.

Thank you again.

Best,

Andy

 
Magento Community Magento Community
Magento Community
Magento Community
 
angelleye
Member
 
Avatar
Total Posts:  45
Joined:  2009-02-09
Kansas City, MO
 

Well, you can’t do that exactly.  The closest thing to it would be to use reference transactions, however, that’s another thing I see that’s completely missing from Magento’s PayPal integration...for both EC and Payments Pro (DirectPayment). 

With reference transactions you can process a single sale or authorization transaction and then simply use that transaction ID you get back from PayPal in the future to process transactions for the same person.  For Payments Pro, where CC numbers are actually getting used, this is much more secure than storing the CC numbers in the database and it also allows for much easier PCI compliance. 

For Express Checkout you’d have to redirect the buyer to PayPal just the first time.  You could do a basic authorization as part of their sign-up process or whatever you want to do.  Store that transaction ID you get back and then you process reference transactions using that original transaction ID by simply passing it along with a new amount.  No need to have them sign-in to PayPal again at this point.  The data is available when they sign into your Magento site.  They won’t even need to enter their PayPal login on your site (which I wouldn’t ever recommend anybody do anyway). 

The problem is that Magento doesn’t have all of this integrated right now.  It seems to give the option of saving the actual CC numbers and then using a saved CC payment method, but again, that’s not very secure and is a lot tougher to get PCI compliance with.  RT’’s would be a much better solution for that.  Express Checkout doesn’t have it integrated at all.

All of that said, I’m more than happy to develop a PayPal module for Magento that includes all of this stuff (as well as a much more robust IPN solution) but I’m struggling learning how to integrate with Magento.  I read over the Wiki article about creating your Payment Method but I guess I need to compare with some other custom modules to see if I can figure out how to make mine work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andy Bala
Jr. Member
 
Total Posts:  11
Joined:  2009-02-02
 

@angeleye, Thank you very much. That helped greatly.

Best,

Andy

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top