I am trying to preserve the user input from the onepage checkout. If the user refreshes the page it needs to be redirected to the review step and all the previous provided data should be restored. I managed to skip to the final step using instructions mentioned in this post Magento: Show the Review Step in One Page Checkout
but however, there is no data loaded.
I tried finding where the checkout data is 'unset' but couldn't get it to work.
Any help would be greatly appreciated. Thanks!
Checkout data is stored as part of the request and not consistently added to one place. For instance, your checkout address information and shipping choices are saved to your quote, but payment information is not saved whatsoever. To do this well, you'll need to save all this request data to the session and add some JS around transitioning to the correct step.
For payment data, CC numbers will be a special case. Saving credit card information is almost always a violation of PCI compliance in the US (and may also be prohibited in other countries). If you integrate a payment wallet from an established gateway (like Authnet), or if you only use non-CC payment types with non-personal information, you may be safe here.
Hope that helps!
Thanks,
Joe
Related
I have setup everything on PayPal and it works well.
My main concern is, when payment is done, I have setup for redirect to my website,
so when payment is done, it goes to my website by Paypal in GET method, I need this in post method, so I have used hidden type rm=2, but still I am not getting desired method.
As per you question in the header, if you would like to store the transaction id in your database, you could make use of IPN or PDT. Which helps in maintaining your inventory management. 'txn_id' is the variable. check here for the available variables.
If you enable Auto Return, the values are always going to get returned only in GET even if rm is set to 2.
I was just wondering if anybody knows how to test magento's payment options.
I have got a few questions.
Do I need to change any code within any of the pages?
Do I need to make any changes to the admin settings ?
Is there a simple setting to test these payment methods out?
Is there only certain payment methods that you can actually check?
No you dont need to change any code. Its all handled from backend.
Generally for development purpose we use Cash on delivery or Check/Money Order payment method.
So you just need to enable these method from backend.
For Testing Credit Cards enable 'Saved CC' Payment Method and during checkout use test credit card type VISA, card number 4111111111111111 with any date of future for Expiration Date and any cvv number
Additionally for proper payment gateway integration You will need to purchase payment gateway which will provide Magento Module along with it. This Payment Method will have 2 modes test and live that are configurable from banckend. So with test mode you can continue development and testing.
Similarly with Paypal. Yo can setup Sandbox test account. Module is already there.
If you want to use Express Checkout:
Go to developer.paypal.com and log in using your PayPal account (it doesn't matter if the acount is empty or not).
Click on the menu item on the top dashboard and then select Accounts from the sidebar.
There, you will find 2 test accounts already set for you. You can modify the existing acounts or create new ones.
This post may help you.
Yes you can test on local host with setup sendbox account.
You can create a 99% discount coupon.
PS: From my experience, that's the standard to test live websites. The sandbox payment only works on staging/dev sites, as it puts the entire website on dev mode.
I recently set up some automatic scripts to help me manage incoming orders for a Magento store by using observers and Magento events. My problem is dealing with the question when exactly an order is placed and saved in the system depending on the selected payment type.
For example: if someone simply choses prepayment, the order is saved immediately and the customer is automatically forwarded to a success page - so no problems so far.
If a customer pays via Paypal, the whole situation is completely different. After being redirected to PayPal, logging into the account and confirming the payment, the customer is not redirected to the Magento store. He can click on a link to return there which will also forward him to the success page but surely not everybody will do that and the problem is that the observer event I use only executes code if the user lands on that page. (The event I am working with is "checkout_Onepage_Controller_Success_Action").
Therefore I need to know from where Magento gets the information whether a PayPal payment was successful, has been cancelled or whatever. I looked through some of the PayPal controller files under /app/code/core/Mage/Paypal/controllers/ and the only thing that looked close to a possible solution was the function successAction() in StandardController.php. However, this function also seems to be triggered only when a customer choses to return to the Magento store so it doesn't help me.
Does anybody have some experience with that issue?
I figured out a way to work around the problem:
Appearently there are no events in Magento which correspond with incoming payments on PayPal. A possible solution might be to provide a IPN URL which triggers a script as soon as the payment is confirmed but I managed to redirect the customer to my store so I did not have to do that.
In the profile settings of the PayPal account under "website settings", there is an option called "automatic redirect". If this option is enabled and a URL is entered, the customer will automatically be forwarded to that URL. At first I thought this would not help me because as I said there are multiple web shops involved which all would have their own individual return URL and you can't specify more than one. However, if a return URL is passed over when contacting PayPal, it will override the one that is specified within the profile settings and since the Magento module does that by default, I just had to enter a random URL in the textfield and enable the option, now the customers are redirected back to my shop when they place an order and pay via PayPal.
I need to make a custom payment method that gets some variables from the customer’s order and sends them as POST variables to an external url.
The variables I need to get from Magento are the total amount, the order number and the products description. Those variables are sent to a url of a third party gateway, where the credit card information is asked in a secure way, and when the transaction is completed, they return the user to my magento site.
I’ve searched for information and tutorials but I still feel a little confused, I’m practically new to programming in magento, so i would really appreciate it if someone could give an step-by-step explanation, or at least a link to a tutorial
Thanks
This is how Paypal works, so the included module for that would be a good starting point but basically:
you have a method on your Payment class that tells Magento that the method is suitable for the order (this lets you use different methods for different order-totals, or currencies etc. but you can just return 'true')
if there are any bits of information you need to capture that Magento otherwise won't, you setup a template/block for your Form, and this is shown when the customer selects your method (Paypal doesn't have such a form)
you implement an 'authorize' method that does any processing of the order details
you implement a getRedirectUrl method that returns a URL for magento to redirect the user too. If you do need to post to your gateway, then your redirect will be to a local URL (/redirect.php say) and here you'll have a form with hidden fields and some javascript that will automatically submit it (you can stick a loading-gif too if you like) which will take the user to the gateway.*
if you provide a URL to the gateway to send the customer back to (you normally do...) then you're going to need a page there too, which does any order-cleanup/validating, before redirecting the customer to the checkout confirmation page
(* you could do this as a controller and template within magento if you want (it's a bit tidier), but explaining how to do it that way will take a bit more time than I have)
Here is a good starting point on creating a custom Magento payment extension for an external gateway.
Just like to send a thanks out in advance for the help.
I have successfully setup a downloadable product with the option of filling out the URL in the Downloadable Information section. I have also successfully integrated the Paypal Express payment option. I can also successfully add the product to my cart, checkout and pay through Paypal Express from the link on my cart. I also am receiving the order email successfully. The problem comes once the download link is clicked, Magento tries to process and download but re-directs to the account login screen.
Here are a few notes:
Guest checkout for downloadable products is enabled.
System->Configuration->Catalog->Downloadable Product Information-> Order Item Status - Set to Pending (I am thinking this is the problem due to the fact that I can't change it to Complete) If you agree, please advise on the best way to accomplish this.
All orders are showing as Complete and PayPal is successfully capturing the monies.
Again, thanks in advance.
Set the Order Item Status to enable Downloads to Invoiced and this fixed the issue for me
There appears to be a bug with Magento 1.4.x that does not allow user account registration at the checkout process. You can select register, walk through the checkout, and you'll get paid and it will all look successful and everything, but Magento will fail to create the customer account, thus making it impossible for the users to download their product.
It totally sucks. I have a store that is useless until I can figure out how to get this fixed, as I only use the express checkout method, and all my products are downloadable.