magento payment process.. how it works in general - php

got a question and I hope this is right place to ask :).. don’t quite understand how payment works in magento.
client goes to checkout and lets say wants to pay as a guest, so provides address etc. and finally gets to payment methods. Then I want clients to pay thru credit card. Already have module installed for gateway (bank?) of my choice. At that point I would expect users to be redirected to 3rd party page (bank hosted) where they giving all the details, only after being returned to my magento site with appropriate message.
In magento however it seems like they need to provide cc numbers and details on magento checkout page. I don’t understand if I (or the payment module I installed) need to transfer then all the credit card details to bank? I would have to have checkout page on ssl connection and static ip right?
The thing is I want to avoid touching CC numbers at any point and would love to have it done by a bank page. I like the idea of magento interface all the way without redirecting to another page though, the only problem is not sure if would be able to set it all up properly.
If anyone could explain to me possible options, what is the common way to do it and how the whole process works that would be very much appreciated.
I did my research and looked all over google and various forums still need someones help though. Please let me know if some parts of my question are not quite clear, will try to better explain if necessary.

Had to develop a payment module for DPS in NZ some time back. How this works is, you go to pay on the site and the payment module php code runs that sends off the details to an acquiring institutions payment website who process the transaction for you with the bank. In my case as I recall it was DPS NZ via some soap calls. The Soap calls contained details such as the total cost, the currency, the merchant number to identify who you are paying. The acquiring institution (DPS in this case) then takes your credit card number and expiry date and do the processing. Then, again via some soap calls back to your own magento website you get redirected back with the error code - success, etc.
DPS use soap I think, but other payment websites may use other protocols to work. The other possibility is that your credit card acquiring page could be hosted on your website and you accept the credit card numbers and do all the processing within magento to the acquirer.
In short, the process is controlled by the payment module itself. If you want to see more detail, have a look at the payment module tutorials that are available and also the comments in the magento forums. You can also look at the paypal module code.

The default architecture that Magento payment modules use involves the customer interfacing with the module and the module talking to your payment gateway behind the scenes.
Basically the customer inputs all his data (CC and all) and hits the payment button at which point certain functions are run in the chosen payment module. What these functions do is entirely up to how the payment gateway works. if the gateway talks via XML they send/receive XML, if it needs SOAP then they use SOAP and so on and so forth. This in fact is the gist of building a new payment module. Open an existing one, check out which functions are called, get rid of the code in there and substitute with your own that will talk to your particular bank/gateway.
Of course some gateways have an alternate way of operating where you send the customer to their pages, he gives them his CC data and he is promptly returned to your site. This way you don't need to worry about handling credit card data, but unfortunately the process of implementing this in Magento is somewhat more involved.
If you need to use a certain gateway then you should first check whether a payment module for it already exists. if not you can download a similar payment module, dissect it and modify it to run your code where appropriate.

Related

Paypal express checkout - buyer details

so I need to ask a question, I need to setup a simple paypal express checkout system, that one can allow users to change currencies, and two can then update the page with the updated currencies.
Then I need a way for me to get the order information. As I will be selling website templates so I need a way for me to get their email address, so I can then email them with the link to the template file download.
So my question is what data do I get if I set up an express checkout system. And what code do I need, Do i need to create a database to get the returned data back from paypal? Or do I just get an email or can i see that when i log into my paypal account and check orders and see their details that way, but the main important detail i need is their email address?
Can I also say that this is the first time I have looked into express shopping carts. So I am a complete novice in this field, So I will struggle with the coding aspect. But I think it is the route I need to go down.
Also I want to make it all in php as well. But also I don't want to use ready made systems. I just need the back-end code so that I can then just implement it into my current design. Not sure if paypal give you the code when you click the express shopping cart option in All tool section. I did notice though it redirects to a page that lists many partner sites. I couldn't find anywhere for any implementation advice or tips or code.
EDIT: Also I know I will also need to use either IPN or PDT but the documentation I read is highly confusing and just is making me unsure if I can even set a system up. I also read that you should implement both systems, but I also read that that had a risk of doing the payment twice. So yeah i am kinda a bit unsure how to even go about implementing a system I need.
Thanks in advance.

Paypal. Payment information page

I use payment via paypal and I need the customer to enter secure payment information on my webpage.
After reading tutorials, I need to set action to paypal => "https://www.paypal.com/cgi-bin/webscr" and the customer to complete their data on paypal website.
Is it possible to have customers enter card data on my own website? Can you offer any advice or manuals on how to implement this?
Thanks. Sorry for my English
Is it possible to have customers enter card data on my own website?
Yes it's possible. Is it advisable? Not if you don't have to.
If you are passing the user to PayPal to complete payment, there is absolutely no reason for you to collect the CC data on your own website. All you do is add to the customer's risk as well as your own (since there are certain legal ramifications if you screw something up).
If what you are asking is how can you do the entire process on your own site, then that's a different answer and a pretty involved one. PayPal has options for this with different plans and each of those options has plenty of documentation on how to setup and configure the process.
As #butlerblog mentioned, there are different levels of integration for ecommerce. If you truly want to stay away from paypal but are considering your other options for third party integration, you can check this site to start getting an idea of how involved with ecommerce you want to get.

sagepay form php - can I get callbacks from sagepay when a transaction completes?

I'm putting sagepay into a PHP powered site.
So far I've had no trouble integrating the Form into the site, their docs are great compared to paypal (mutter mutter)
However I noticed in the dev guide for form integration, they say you can't rely on sagepay sending the customer back every time as they could close the browser, or navigate somewhere else etc.
At the same time, I don't want to move everything out of the user's cart and into an order before I know it's been confirmed / payed for - otherwise if they cancel or the transaction fails somehow on sagepay's end, their cart will be wiped out when they come back, making retrying the transaction a pain for the user, and I will have a duff order polluting my database.
So what I want to know is if there is a way to get sagepay to send a request to the site when something happens with a payment, similar to paypal's Instant Payment Notifications?
EDIT:
Or are they only saying it's patchy because they can't garuantee it, but it works enough of the time to practically rely on it?
Sagepay (AKA Protx) form integration redirects the user automatically once the transaction has completed.
For small sites, i advise my clients to always check the sagepay transaction logs (on the sagepay site) before sending out any goods.
You should be logging the order before they go to Sagepay. Then changing it's "status" to paid when they get redirected back to your site. This gives you a bit more of a paper trail to pick up any possible issues.
If you want a more robust solution. Try Sagepay direct integration. It has more requirements and is harder to integrate but on bigger projects (where you can't manually check orders) it's usually required. Mainly because users can stay on-site without having to go off to Sagepay to make payments.

Magento Recurring Profiles with non-Paypal payment method

Interested to know if (a) this is possible, and (b) whether any of you have successfully implemented the functionality. The wiki page repeatedly refers to "Currently, by default, Magento supports purchasing items with recurring profiles only for the PayPal payment system and only through the Express Checkout method." - I'm not sure if that's because there are no payment other methods currently implementing the Interface, or because they've hardcoded the architecture such that it will only work with Paypal.
To test this, I've created a payment method that stubs out the Mage_Payment_Model_Recurring_Profile_MethodInterface methods, and that payment option is now presented when I go through checkout with a Nominal product (i.e. product with a recurring profile) and the order is placed successfully. However it doesn't appear in the list of Sales>Recurring Profiles or Customer's Billing Agreements. I guess they will be populated by the stubbed-out methods.
I suspect that the fields in Mage_Payment_Model_Recurring_Profile are setup to mirror those required by Paypal, so it may take some mapping to translate those into another payment gateway's requirements, but that should be achievable theoretically, possibly using a model override.
Sorry for the rambling question, but I'm keen to hear your experiences since the framework seems to support it on first investigation.
Which country are you in? With some adaption of the RBS WorldPay module you can use RBS FuturePay which is geared around repeat payments. I only had to use the module to take two 50-50 payments, however, the FuturePay technical support was brilliant and the Phoenix WorldPay module is not bad either (as starting points go). Getting it to integrate into Magento's Recurring Payments profile is not something I needed to get to work, however, you could put some other form for people to cancel an order.

Pay online service

I have a database where you can select articles etc, users have an account, it's all in mysql and php (i guess you don't need that code).
What i was wondering was how to write a script that allows users to pay online for the articles they selected?
It doesn't need to be any code, just ideas / hints / tips / ... (that are doable in PHP or something similar)
Thanks in advance!!
-Samuel
You have to do that through a service that collects money, such as paypal or a bank.
You make an account there, and they will provide the necessary files and documentation to do that.
Usually it will mean
when the user wants to pay, you redirect them to a specific page in the payment site
you host an IPN (Instant Payment Notification) file where that site will contact you when he receives a payment
I've done some paypal coding before and it is easy to set up, suggest that you should search for payment gateway that, i've work with ipay88.com before its one of payment gateway at my place.
Usually if you setup the paypal for the business transaction you will need to register as merchant account and they will charge you per transaction, same goes with payment gateway.
It is a very broad question. But basically you need to integrate some payment module, such as paypal. Look at their website, where there are tutorials on how to get it working with php.

Categories