News:

Looking for documentation? Take a look on our wiki

Main Menu

Yet another PP setup issue

Started by Sp34k, March 22, 2010, 13:24:23 PM

Previous topic - Next topic

Sp34k

Dear community

I've been reading hundreds upon hundreds of guides/instructions/issues related to Paypal setup in Virtualmart, it's amazing how many have issues with it and yet - I couldn't find anything that helped me out.

I started off by reading the sticky topic relating "setting up" the paypal setting but I can't complete it because my "configuration" does only contain the "Payment Extra Info"..

Info:
1. I have installed the latest VirtualMart version.
2. I have setup a paypal account at paypal.com
3. I went to Payment Method List
4. I disabled everything beside Paypal
5. I clicked on Paypal to configure the payment

These are the settings I use:

QuoteActive?: Y      
Payment Method Name: Paypal    
Code: PP
Payment class name: Ps_Payment    
Payment method type: HTML-Form based (e.g. PayPal)

Shopper Group: Music
Discount: 0.00
Discount Type: Total
Maximum discount amount: 0.00   
Minimum discount amount: 0.00   
List Order: 1   

Under Configuration:

I'm only able to change the Payment Extra Info:

Quote<?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_total, 2),
"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( $page == "checkout.thankyou" ) {
$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" 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>';

}
?>

When I click on an item that I wan't to purchase on the website and right after click "View basket" - then "check out", then I'm only able to login or enter billing adresse..

You can check it out yourself here: www.paulfromstokeuk.com/v1

I'm looking forward to a response, I have spend my weekend trying to solve this problem so this community is my last place to find help.

Cheers,
Mike

Oebel

Hi Mike,

first of all my Firefox (3.6) didn't like your way of creating a new customer... I was being forced to work in the small screen created during sign-up...

Second, when I try to pay by Paypal, I get an error that the e-mail address you supplied is not correct. That's why I'm not able to complete the transaction...

Something seems to be wrong with your paypal account maybe...

Best regards,

Oebel

stinga

G'day,

If you are only able to change Payment Extra Info, then this is going to be your problem, you need to be able to put in PP email address.

To get you going you could just edit...
administrator/components/com_virtuemart/classes/payment/ps_paypal.cfg.php
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

Sp34k

Thank you Oebel and stinga for you're replies.

Oebel:

It sounds weird with the firefox issue because I also use firefox, do you think I could trick you to visit the reg. page again and see if everything is alright? I had some problems with my hosting last night so I don't know if that's the problem:)

So when you're clicking "checkout" you can chose to pay by paypal? I can't do that, I only see "login" or "enter billing adresse" which is not my wish.


Stinga:

I opened the ps_paypal.cfg.php and entered the email as you said, it now looks like this:

Quote<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );

define ('PAYPAL_DEBUG', '1');
define ('PAYPAL_EMAIL', '[the paypal email is here');
define ('PAYPAL_VERIFIED_ONLY', '0');
define ('PAYPAL_VERIFIED_STATUS', 'C');
define ('PAYPAL_PENDING_STATUS', 'P');
define ('PAYPAL_INVALID_STATUS', 'X');
?>

Yet im still not able to make it work, when I "checkout" I'm only able to "login" or "Enter billing adresse" like if im supposed to ship something, this is only for digital downloads:)

I'm looking forward for a response,
thank you,
Mike

stinga

Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

Sp34k

Hallo Stinga and thank you for you're fast reply, I have changed the debug to 0.

Now I only have 1 issue left and it's the biggest one of them all I guess..
When I checkout, it's required to LOGIN before proceeding to paypal payment, what I really wan't is the system to allow unregistered users to choose the products they wan't and hit View Basket -> Checkout -> Paypal

The settings I've used under Admin -> Configuration is:

QuoteUser Registration Type: Silent account
Show the "Remember me" checkbox on login?: Y            
Joomla!: User registration allowed?: Yes
Joomla!: New account activation necessary?: No

I have tried to use different settings to see if it changes the fact people need to login before paying with paypal and to get rid of the "New? Please provide your billing adresse", I only wan't paypal to appear..

Once again, if you have forgotten, you can visit the site at:
www.paulfromstokeuk.com/v1
1. Click Webshop
2. Add the only product that's listed
3. Click "cart" og "view basket"
4. Checkout

Cheers and thank you,
Mike

stinga

G'day,

Go into 'manage user fields' and turn off everything.
Then it will just want an email address.

You might want to change the headings a bit.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

Sp34k

Hallo Stinga, thank you once again for participating in my topic.

I went to Manage user fields and diabled everything beside:

Quoteusername
email
password
password2
I'm not able to turn these 4 fields off and it's still not directing the user directly to paypal payment when they click on "checkout".

I don't know if it's possible to ask a trustful person on the forum to actually take a look at the settings because I know how annoying it can be to continue a thread like this.

Regards,
Mike

stinga

G'day,

Not at all bothersome, all information is good information.
I had a look at my test system and did some playing, I managed to get it so it only asked for an email address, but you stilled to select the "New? Please provide your billing address", hence my comment about changing the headings.

It should not ask for those details if the silent option is used.

You are never going to get it to go direct to paypal because it needs an email address to send information to.
The best I got was email only and then paypal.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

Sp34k

#9
Dear Stinga, thank you for you're reply:)

Stinga I apologize for my stupidity but when you said "Changing the headings" what do you exactly mean?
- I've been trying different things to only allow the "enter email" -> continue to paypal payment, and it succeeded!:) It's a little sad that people have to login to make a payment but uhm, I believe that's just how it is.

The only error I get now is this when the payment has been confirmed and they click on Order Information :

QuoteError: The code of the payment method PayPal (PP) contains a Parse Error!
Please correct that first

I'm not sure if it's the ps_paypal.cfg.php, if so, then it looks like this:

Quote<?php
if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );

define ('PAYPAL_DEBUG', '0');
define ('PAYPAL_EMAIL', '[Paypal-email-here');
define ('PAYPAL_VERIFIED_ONLY', '0');
define ('PAYPAL_VERIFIED_STATUS', 'C');
define ('PAYPAL_PENDING_STATUS', 'P');
define ('PAYPAL_INVALID_STATUS', 'X');
?>

Cheers,
Mike

stinga

G'day,

By changing the heading I meant change "New? Please Provide Your Billing Information" to make it a bit more obvious that you need to enter an email address rather than a billing address.
I don't think you have to login, but you do need the email address.

Why is there a [ in that email address?
define ('PAYPAL_EMAIL', '[Paypal-email-here');

I just tried it but I did not get an sort of error



Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

stinga

G'day,

Have you changed the 'Payment Extra Info' from above, if so can you post it?
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4

Sp34k

Dear Stinga, I have sent you a PM reply, It doesn't appear in the Outbox so please tell me if you haven't recieved it.

Best wishes,
mike

stinga

I have exceed my personal message allowance! I can't sent you PM's for an hour :(.

The way it is setup at the moment, you only have to enter an email address, it will do the rest for you.
If you are a returning customer you will need to know your password to login.
Stinga.
614869 products in 747 categories with 15749 products in 1 category.
                                             Document Complete   Fully Loaded
                Load Time First Byte Start Render   Time      Requests      Time      Requests
First View     2.470s     0.635s     1.276s          2.470s       31            2.470s      31
Repeat View  1.064s     0.561s     1.100s          1.064s       4             1.221s       4