News:

Support the VirtueMart project and become a member

Main Menu

PayPal Payment Process not Fucntioning Right

Started by doribeeler, December 08, 2010, 19:45:41 PM

Previous topic - Next topic

doribeeler

Im looking for some insight here... can someone please reply, even if the reply is "Dont know..", "Try this extension", etc. etc. Thank you.

Using VM 1.1.5 with Joomla 1.5 and PayPal payment module (not paypal Pro that I am aware of).

When the customer goes through the entire checkout process on the site (Steps 1-4), upon completing the last step - providing credit card details, it only says Pending Order, does not send over to paypal for payment. On the page that says "Pending Order" there is a PayPal button which must be clicked and then enter in all personal details again... to finalize payment...

Paypal suggested it was the VM system not communicating with PayPal... if that is the case, can someone please advise of proper config for this payment module?

All steps were followed according to this topic: http://forum.virtuemart.net/index.php?topic=39584.0

However it still does not work as expected... we are expecting that when the customers enters all data on the VM system that there will be something to prompt payment to paypal, but then when directed to paypal it will take all the client data with it...

This is the code in my config of the payment module...
<?php
$db1 
= new ps_DB();
$q "SELECT country_2_code FROM #__vm_country WHERE country_3_code='".$user->country."' ORDER BY country_2_code ASC";
$db1->query($q);

$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" => "_ext-enter",
"redirect_cmd" => "_xclick",
"upload" => "1",
"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_total2),
"shipping" => sprintf("%.2f"$db->f("order_shipping")),
"currency_code" => $_SESSION['vendor_currency'],

"address_override" => "1",
"first_name" => $dbbt->f('first_name'),
"last_name" => $dbbt->f('last_name'),
"address1" => $dbbt->f('address_1'),
"address2" => $dbbt->f('address_2'),
"zip" => $dbbt->f('zip'),
"city" => $dbbt->f('city'),
"state" => $dbbt->f('state'),
"country" => $db1->f('country_2_code'),
"email" => $dbbt->f('user_email'),
"night_phone_b" => $dbbt->f('phone_1'),
"cpp_header_image" => $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( 
false ) {
$query_string "?";
foreach( 
$post_variables as $name => $value ) {
$query_string .= $name"=" urlencode($value) ."&";
}
vmRedirect$url $query_string );
} else {
echo 
'<form action="'.$url.'" method="post" target="_blank">';
echo 
'<input type="image" name="submit" src="https://www.paypal.com/en_US/i/btn/x-click-but6.gif" border="0" alt="Click to pay with PayPal - it is fast, free and secure!" />';

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

}
?>


I really need some help, site needs to go live, like 2 weeks ago... thank you.

piperpilot

When I was testing the normal Paypal module, was having similar problems.  Look at this thread:

http://forum.virtuemart.net/index.php?topic=49535.0

Go to the last page and copy the code from there.  When I was working with it, it seemed to work fine.

Hope this helps.

doribeeler

Awww, thank you this is sooooo much better. Im curious though... what I am trying to do is make sure that all data entered by the customer in VM is transmitted to the paypal screen. Everything seemed to do that just fine - with exception of the credit card number and details... did you have the same problem? Or perhaps for security reasons this just is not possible?

Hope you are still around to reply!

piperpilot

Sorry for the delay in responding.  Didn't have this thread emailing me on update.

I don't EVER have a customer enter their credit card number into a page on my site.  Thats why I use Paypal for payments.  If you have them enter CC into your site you need:

1.  To have SSL encrypted pages.  I don't use any SSL on my site for simplicity

2.  You'll need PCI compliance.  This is non-trivial and is best avoided for small sites that can take advantage of Paypal and other processing services.

Hope this helps!

doribeeler

It does on some level, so how do you dis enable to credit card gathering part of the VM shopping cart? Do you have all items go direct to PayPal? If you would like to see how the site is set up with paypal, etc. it might help with my question...

Log in with:
User: gold
pw: testing

If you dont mind, I would appreciate some help. Oh - and we do have an SSL, so Im not worried about that, more worried about the duplication of functions...
Thank you!



piperpilot

With "PayPal" selected as the payment type, you shouldn't see the credit card info form.  It should pass the cart on to paypal for payment.  UNLESS you are using Website Payments Pro.

I assume you are using the "PayPal (Legacy)" payment method.

Go to the Payment Methods and click on that and make sure that Payment method type is set for:  HTML-Form based (e.g. PayPal)

In standard paypal, they handle all credit card information.  Now if you are using Website Payments Professional, then it is different, you collect the info and pass it on to paypal.  That requires a different setup.  You would want to use the "Direct Payment" option in the "Paypal - New API" module.

Hope this helps.

doribeeler

This helps a lot, thanks! I do have Wesbite Payments Pro on the paypal side... however, I do not have the API option for paypal payment method in my VM backend... how do I get that? My current PayPal Payment method is set for html.. in fact the code you suggested I use is what got me this far... does all that make sense.
Thanks so much for your help!

piperpilot

Hmmm...well not sure why you don't have the (new API) paypal option.  It was standard with my installation.  Maybe upgrade to 1.1.6?  Attached is a screenshot of what mine looks like with a standard installation.


[attachment cleanup by admin]

doribeeler

Hmmm, yeah dont want to do that...if I dont have too... maybe I can try to create one? What do you have for configuration options on the API?

piperpilot

Screen shot attached.  Hopefully all of the code is there!

[attachment cleanup by admin]

doribeeler

hey thanks piperpilot... can you - please - send the configuration tab screen as well? I think that should wrap it up! Or if you prefer you can PM the screen shot... you have been most helpful!

piperpilot

Here you go...mine is set up to go to the sandbox right now.  I also don't use website payments pro, I just use standard.  In my case the only way to check out on my side is with the "Express Checkout" option.  I think if you want to use "Direct Payment", you need to change the payment method type to Credit Card and select Enable Direct Payment "yes".


[attachment cleanup by admin]

doribeeler