68 Classifieds Forums
Go Back   68 Classifieds Forums > v3.0.x Help & Support > v3.0 Questions & Support > Paypal issues
v3.0 Questions & Support Help and support for 68 Classifieds

 
Thread Tools Display Modes
(#1)
Old
doug-gb doug-gb is offline
Junior Member
doug-gb is on a distinguished road
 
Posts: 20
Join Date: Mar 2006
Location: UK
Default Paypal issues - 03-29-2006, 09:56 AM

Hi,

#1 When I was testing my Paypal setup the payment went through, however towards the end of the process a PHP message was displayed from thanks.php

Notice: Query failed:

Notice: You have an error in your SQL syntax near " at line 1 SQL: SELECT title, price FROM class_products WHERE id= in ..website/classifieds/includes/MYSQL.php on line 120

Apparently ID had no value.

#2 In the in the Paypal details of the transaction it indicated "NO Address Provided"

Is it possible for the customer address to be passed to Paypal so that I can have the customers' address?

I would be grateful for any advice on these issues.

Doug
Reply With Quote
(#2)
Old
suzkaw suzkaw is offline
Yes it still hurts. :(
suzkaw has a spectacular aura about
 
Posts: 2,020
Join Date: Mar 2006
Location: Belmont, NC
Default 03-29-2006, 10:16 AM

Doug,

To you now what version you are running?


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#3)
Old
doug-gb doug-gb is offline
Junior Member
doug-gb is on a distinguished road
 
Posts: 20
Join Date: Mar 2006
Location: UK
Default Paypal Issues - 03-29-2006, 10:20 AM

Sorry Eric, I should have said:

Developer 3.0.14

Many thanks, Doug
Reply With Quote
(#4)
Old
suzkaw suzkaw is offline
Yes it still hurts. :(
suzkaw has a spectacular aura about
 
Posts: 2,020
Join Date: Mar 2006
Location: Belmont, NC
Default 03-29-2006, 10:43 AM

Do you have the developer edition?

If so can you open the thanks.php page and go to line 148 and change:
$emailnotify = "Y"; to:
$emailnotify = "N";


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#5)
Old
doug-gb doug-gb is offline
Junior Member
doug-gb is on a distinguished road
 
Posts: 20
Join Date: Mar 2006
Location: UK
Default Paypal - 03-29-2006, 11:27 AM

Hi Eric

I have amended line 148 thanks.php line as described, and the error messages are not now displayed. Is there problem then, when $emailnotify = "Y"; in the original code?

Please, have you any advice on issue #2 "No Address Provided" to Paypal as described in my first email?

Thank you
Doug
Developer V3.0.14
Reply With Quote
(#6)
Old
suzkaw suzkaw is offline
Yes it still hurts. :(
suzkaw has a spectacular aura about
 
Posts: 2,020
Join Date: Mar 2006
Location: Belmont, NC
Default 03-29-2006, 11:41 AM

That was a bug in the file.

For the address issue. Do you have that have the address as being seen and required through the administration?


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#7)
Old
doug-gb doug-gb is offline
Junior Member
doug-gb is on a distinguished road
 
Posts: 20
Join Date: Mar 2006
Location: UK
Default 03-29-2006, 11:58 AM

If I understand you correctly, yes I would like the customer's Classifieds registered address to be passed to Paypal so that it it can be seen in the transaction in Paypal and in the payment notification which Paypal sends to us. Could this be done?

Thank you for your continued help, Eric

Doug
Reply With Quote
(#8)
Old
suzkaw suzkaw is offline
Yes it still hurts. :(
suzkaw has a spectacular aura about
 
Posts: 2,020
Join Date: Mar 2006
Location: Belmont, NC
Default 03-29-2006, 12:03 PM

That should be sent automatically if they have an address entered. I will double check the code and make sure this is correct.


--
Thanks,
Eric Barnes
68 Classifieds
Documentation - Modifications - My Blog

Reply With Quote
(#9)
Old
doug-gb doug-gb is offline
Junior Member
doug-gb is on a distinguished road
 
Posts: 20
Join Date: Mar 2006
Location: UK
Default Paypal Address - 03-30-2006, 03:07 AM

Eric,

Yes I can confirm that all the address details are entered in the account registration details, but still "No Address Provided" showing on the Paypal side.

Best regards
Doug
Reply With Quote
(#10)
Old
doug-gb doug-gb is offline
Junior Member
doug-gb is on a distinguished road
 
Posts: 20
Join Date: Mar 2006
Location: UK
Default Paypal - No Address Provided - 04-03-2006, 06:27 AM

To everyone who is interested:

I had a problem because the Paypal transaction did not record the customer's address.

The reason I need the customer's address on the Paypal notification is because when customers pay for a particular advert package, we 'ship' them some material (a For Sale Sign) by Royal Mail, however Paypal just recorded 'No address provided'.

With Eric's very kind assistance the following changes seem to provide the solution although I shall check further that everything is working as intended.

1. Open usercheckout.php and locate:
$paymentform=displayPaypal($listingid,$grandTotal, $package);
Change to:
$paymentform=displayPaypal($listingid,$grandTotal, $package, $userinfo);

Open includes/functions_payment.php and locate:
function displayPaypal($listingid,$price,$package)
Change to:
function displayPaypal($listingid,$price,$package, $userinfo)

and go to line 44 which should looks like this:
$output.= '<input type="hidden" name="business" value="'.$extra.'" />';

Just below it add:
//added
$output.= '<input type="hidden" name="address1" value=""'.$userinfo['address'].'"">';
$output.= '<input type="hidden" name="city" value="'.$userinfo['city'].'">';
$output.= '<input type="hidden" name="state" value="'.$userinfo['state'].'">';
$output.= '<input type="hidden" name="zip" value="'.$userinfo['zip'].'">';
$output.= '<input type="hidden" name="address_override" value="0">';
//end added

and finally change this line which will now be line 60 value="1" to value="2"

$output.='<input type="hidden" name="no_shipping" value="2" />';

If anyone has any comments, advice or spots any problems with this I would be very pleased to hear from you.

Best regards, Doug
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Paypal Buy now button sleepylok v3.1 Questions & Support 7 02-27-2007 09:30 AM
Paypal returning to userlogin.php pedromtze v3.1 Questions & Support 4 10-13-2006 01:54 PM
Paypal thanks page turkeygeorge v3.1 Questions & Support 2 07-11-2006 12:36 PM
After 3.0 > 3.1 upgrade, Paypal payments no longer post back civ v3.1 Questions & Support 6 06-05-2006 01:20 PM
paypal - manual approval juven14 v3.1 Questions & Support 5 04-12-2006 01:11 PM



Powered by vBulletin® Version 3.6.3
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com