Welcome, Guest. Please login or register.
Login with username, password and session length


It's a release candidate! VirtueMart 2.0 RC - the next generation VirtueMart - is available! Read more....

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
Pages: [1]   Go Down
Print
Author Topic: Checkout Issue: Asks cusotmer for info twice...Help  (Read 6294 times)
cauldron
Newbie
*
Posts: 5


« on: March 11, 2008, 19:53:33 PM »

OK, I didn't know how to seek out the answer to this issue in the forum IF it has been addressed yet.  Here we go:  When a customer checks out through the VM cart it takes them through the checkout process and they input all their information and so on.  I have iTransact as my payment processor module.  As soon as they complete that and hit the next or finish button (i forget), it takes them to the iTransact payment module on their site to re-enter the information that they just entered.  Needless to say this is causing my customers to freak out. 

I need to know how to bypass the VM part that asks them to input their information twice.  Granted I need the info to get their orders and address to know where to ship it, but I do not need their CC info on file on our database as it is recorded by iTransact and I am able to do payments and refunds from their control panel on my account.

Any ideas?  Thank you ahead of time...
Logged
david_gbg
Newbie
*
Posts: 3


« Reply #1 on: March 12, 2008, 10:31:04 AM »

I have the exact same problem with paypal!
Logged
cauldron
Newbie
*
Posts: 5


« Reply #2 on: March 12, 2008, 10:39:04 AM »

I have the fix for the paypal, just need one for iTransact.  Here's the paypal hack:

Hello,

you might have noticed the hundreds of topics about PayPal IPN and issues with it. As PayPal is one of the most popular payment systems for an online-shop it's important to have a running payment method with it.

How do I install PayPal?
You don't have to install it. PayPal is a part of the official distribution and installed per default.

You just have to go to "Store" => "Payment method list" and click on "PayPal".

If you want to know which files are responsible for PayPal:
VIRTUEMART:
* site_root/administrator/components/com_virtuemart/notify.php
[This is the script where paypal.com should post to when a transaction is made. If the transaction was VERIFIED, the order status is usually update to the oder status you have set in the configuration (you can set that for Confirmed, Pending & Failed payments).]
* site_root/administrator/components/com_virtuemart/classes/payment/ps_paypal.php
[This is the main class for the paypal configuration. It actually doesn't play any role on checkout.]
* site_root/administrator/components/com_virtuemart/classes/payment/ps_paypal.cfg.php
[The configuration file for the paypal settings. Remember that this file must be writable to save changes to the configuration.]

How do setup PayPal?
This payment method is to be set up as every other payment method: go to "Store" => "List Payment Methods", then select "PayPal" from the list. Once the payment method form for PayPal has opened, you can activate/deactivate it, rename it (the name of the payment method doesn't really matter!), restrict it to a shopper group, define a discount value and change the method's position in a list with other payment methods (list order).
Please note that there's an important Configuration Panel, which can be reached by clicking on the Tab Heading "Configuration".
Test Mode [yes/no; default=no]
When you enable the test mode, you can debug the script using eliteweaver's ipn testing environment. Last time I used that, i didn't worked and didn't recognize that the script was posting back (I know it did!). This is NOT FOR THE PAYPAL SANDBOX!

PayPal Email
Your business email, which is your login at paypal (or paypal sandbox).

Order Status for confirmed Payments
Order Status for Pending Payments
Order Status for failed Payments
With these settings you can define, which Order Status should be set when a payment was successful / is pending / has failed.
IMPORTANT: PayPal seems to return "Pending" very often, although the payment will be no problem. A further investigation, why the payment is still pending is not made at this time (we'll have to improve the paypal notify script to check that).
That's why you see "An error occured while processing your transaction. The status of your order could not be updated": You obviously haven't set the Order Status for pending payments to "confirmed".

Payment Extra Info
The textarea is used by each payment method. You can fill in HTML/PHP/Javascript here. It is executed:
* on the "Thankyou" page
* each time the order is viewed by the customer (and it's order status is not "confirmed")

So you can use it to
* process additional affiliate tasks
* show your bank account details
* whatever you want to display to the customer

I have rewritten the Payment Extrainfo Code for PayPal, so i directly redirects the customer to PayPal after clicking on "Confirm" to place the order. Just copy and paste it into your PayPal Extrainfo box.

CODE FOR USE IN VIRTUEMART
Code [Toggle White Space Wrap]
<?php
$url = "https://www.paypal.com/cgi-bin/webscr";
$tax_total = $db->f("order_tax") + $db->f("order_shipping_tax");
$discount_total = $db->f("coupon_discount") + $db->f("order_discount");
$post_variables = Array(
"cmd" => "_xclick",
"business" => PAYPAL_EMAIL,
"receiver_email" => PAYPAL_EMAIL,
"item_name" => $VM_LANG->_PHPSHOP_ORDER_PRINT_PO_NUMBER.": ". $db->f("order_id"),
"order_id" => $db->f("order_id"),
"invoice" => $db->f("order_number"),
"amount" => round( $db->f("order_subtotal")+$tax_total-$discount_total, 2),
"shipping" => sprintf("%.2f", $db->f("order_shipping")),
"currency_code" => $_SESSION['vendor_currency'],
"first_name" => $dbbt->f('first_name'),
"last_name" => $dbbt->f('last_name'),
"address_street" => $dbbt->f('address_1'),
"address_zip" => $dbbt->f('zip'),
"address_city" => $dbbt->f('city'),
"address_state" => $dbbt->f('state'),
"address_country" => $dbbt->f('country'),
"image_url" => $vendor_image_url,
"return" => SECUREURL ."index.php?option=com_virtuemart&page=checkout.result&order_id=".$db->f("order_id"),
"notify_url" => SECUREURL ."administrator/components/com_virtuemart/notify.php",
"cancel_return" => SECUREURL ."index.php",
"undefined_quantity" => "0",
"test_ipn" => PAYPAL_DEBUG,
"pal" => "NRUBJXESJTY24",
"no_shipping" => "1",
"no_note" => "1"
);
if( $page == "checkout.thankyou" ) {
$query_string = "?";
foreach( $post_variables as $name => $value ) {
$query_string .= $name. "=" . urlencode($value) ."&";
}
mosRedirect( $url . $query_string );
} else {

echo '<form action="'.$url.'" method="post" target="_blank">';
echo '<input type="image" name="submit" src="http://images.paypal.com/images/x-click-but6.gif" border="0" alt="Make payments with PayPal, it is fast, free, and secure!" />';

foreach( $post_variables as $name => $value ) {
echo '<input type="hidden" name="'.$name.'" value="'.$value."\" />\n";
}

echo '</form>';

}
?>
If you don't want your customer to be redirected after confirmation, but still want him to click on "Pay with PayPal", change
Code [Toggle White Space Wrap]
if( $page == "checkout.thankyou" ) {
to
Code [Toggle White Space Wrap]
if( false ) {

Don't forget to save all your changes.   

Common Questions

My PayPal doesn't work. What's wrong?
It could be anything. Please review your settings and read the other Questions/Answers.

How can I use the PayPal Sandbox for debugging my PayPal Payment Method?
This is really easy: you just need to change the payment extrainfo in the payment method form for PayPal:
Change
Code [Toggle White Space Wrap]
$url = "https://www.paypal.com/cgi-bin/webscr";
to
Code [Toggle White Space Wrap]
$url = "https://www.sandbox.paypal.com/cgi-bin/webscr";
and save. Please remember: DO NOT TURN ON DEBUG MODE WHEN WORKING WITH THE SANDBOX!

I'm getting the message "An error occured while processing your transaction. The status of your order could not be updated." when returning from PayPal.
Please be careful before you blame VirtueMart.
There are many reasons why this message could be displayed.
•   Your script can't be reached from the internet
It's important that your notify.php is not protected by .htaccess files (which is the case when you secure your /administrator directory).
Try to point to it with your browser.
•   There's a parsing error in your script.
If you have no idea why things go wrong, do the following:
* Enable Debug Mode
* Go to http://www.eliteweaver.co.uk/testing/ipntest.php and debug your script.
* Click on "Follow IPN" after you have clicked on "Submit IPN" to see the real debug output of your notify.php script
•   Your Payment returned the payment status "Pending" or "Failed".
When you have a pending or failed payment, the notify.php script changes the order status to whatever you have set in the paypal configuration for it. BUT: if this isn't "confirmed", you will see this error message.

How can I change the return page?
The file behind that default return page is
site_root/administrator/components/com_virtuemart/html/checkout.result.php

You can also change the return page in the payment extrainfo in the payment method form for PayPal or set your own Notify URL in your PayPal Account.

I hope that clears it a little bit.

ciao, Soeren

UPDATED 2005-11-22 for VirtueMart and mambo-phpShop
UPDATED 2007-10-19 for VirtueMart (included discount, removed code for mambo-phpShop)
Logged
jmwaniki
Newbie
*
Posts: 6


« Reply #3 on: August 09, 2008, 17:04:57 PM »

I have the same problem with 2checkout. Anyone with a fix. ( virtuemart 1.1.2)
Logged
cauldron
Newbie
*
Posts: 5


« Reply #4 on: August 12, 2008, 23:40:54 PM »

Would really be nice if someone knew how to fix the iTransact issue.  I cannot change payment processors and although iTransact "says" Virtuemart is one of the compatible SC's with them, getting someone in their tech support with half a brain is near impossible.  This is the only thing that has kept my site from going live for over 5 months now.  As soon as it is resolved I can dump the html site and start using the site I spent countless hours building.

Anyone...??  Anyone???

Logged
mlipscomb
Development Team
Newbie
*
Posts: 24


US-Based Development


WWW
« Reply #5 on: May 04, 2009, 18:10:29 PM »

To get iTransact to work with VM you must use the script that is now posted on  their site.  I updated it to work correctly with VM.  Please note:  it DOES NOT include instant payment notification (yet - I'm working on that part.)

Here are the steps to make it work:
1.  Download the new script at  http://www.itransact.com/redicart/virtuemart_pc.txt.zip
2.  UNZIP the file and open the text file included (virtuemart_pc.txt)
3.  Go to the admin area of your Joomla site and click on Components --> Virtuemart.
4.  Click on Store ---->  List Payment Methods
5.  Click on the word "iTransact"
6.  In the settings under the tab "Payment Method Form" select "HTML-Form based (e.g. PayPal)"
7.  Click on the tab "Configuration"
8.  Copy and paste the contents of the text file you just downloaded into this area.  (Make sure to delete all the information that's already in there).
9.  Change the "XXXXX" in the "$vendorID ="XXXXX" to your vendor ID (THIS IS NOT YOUR GATEWAY ID)  The final should look something like this:  $vendorID ="x5u93754hj"
10.  Click "Save" at the top.

Once again, please note that this change WILL process payments correctly (i.e., charge the customer's card and put the money in your account) but it will not send back information to VirtueMart to change the status to "Completed" instead of pending.  I'm working on that, but haven't gotten it completed yet.

~Matt
Logged

sunriselfc
Newbie
*
Posts: 3


« Reply #6 on: October 02, 2009, 22:36:16 PM »

It can be fixed by using XML connection, PM me to get it Smiley
Logged
Pages: [1]   Go Up
Print
Jump to: