Go Live With PayPal

General Support for technical Issues relating to AlegroCart
Post Reply
shaun250958
Posts: 15
Joined: Fri Aug 17, 2012 3:41 pm

Go Live With PayPal

Post by shaun250958 » Tue Aug 21, 2012 9:50 pm

Well, I have set up my production site and I am raring to go...
I now want to enable production PayPal and place a real order.
I have set myself up with my own Customer Account.
I already have my own PayPal Account that is separate from the one that I am using for my ShoppingCart business.
If I enter my website and place an order using PayPal I end up at the PayPal Sanddbox / Test Site:

https://www.sandbox.paypal.com/us/cgi-b ... b498e6e144

How do I change the set up so that go to the Production PayPal site so that I can complete a proper order?

Thanks.
:D

User avatar
Brent
Site Admin
Posts: 4459
Joined: Sat Dec 12, 2009 3:35 pm
Location: Canada eh

Re: Go Live With PayPal

Post by Brent » Wed Aug 22, 2012 2:44 am

In admin/PayPal, have you changed the setting from test?

shaun250958
Posts: 15
Joined: Fri Aug 17, 2012 3:41 pm

Re: Go Live With PayPal

Post by shaun250958 » Wed Aug 22, 2012 10:29 am

I must be going blind... I looked in there TWICE and didn't see it! :D
Anyway, I have PayPal almost working now. Orders can be placed but I am getting "ERROR" as the subject in order confirmation emails and the following error reported to me by Alegro:


MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order where reference = '50351-32F78-56B26'' at line 1 Error No: 1064 select order_id from order where reference = '50351-32F78-56B26'
Path: /alegro/?controller=checkout_process&payment=paypal&method=ipn&ref=50351-32F78-56B26&action=callback
Query String: controller=checkout_process&payment=paypal&method=ipn&ref=50351-32F78-56B26&action=callback
IP:173.0.81.1 Remote Host:notify.paypal.com
log: Error was logged to file: /home/viabel/public_html/alegro/logs/error_log/error-20120823.txt.
##################################################

Any ideas?

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Go Live With PayPal

Post by leo » Thu Aug 23, 2012 11:55 pm

Does this issue still exist?

shaun250958
Posts: 15
Joined: Fri Aug 17, 2012 3:41 pm

Restrict my Website to NZ Customers

Post by shaun250958 » Tue Aug 28, 2012 1:00 pm

Hi again,
I only want to trade in NZ at this point in time; I am not interested in shipping overseas.
I have made this clear as best I can in my Website set up and text.
However, I still get many overseas people on my site and some are listed as spammers, etc.
How do I restrict access to my site to people only located in NZ?
:D

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Go Live With PayPal

Post by leo » Tue Aug 28, 2012 1:14 pm

No way.
But, you can limit country to NZ in admin. So, in this case only people living in NZ will register on your site.
Anyway, what's the problem with foreign visitors?
Are they trying to register?
Enable captcha in settings if you are flooded by spammers.

webwolf
Posts: 1
Joined: Tue Sep 18, 2012 9:11 am

Re: Go Live With PayPal

Post by webwolf » Tue Sep 18, 2012 9:23 am

I had this problem and I may have found a solution.
In the file catalog/model/payment/model_payment around line 55 it calls:
$result = $this->database->getrow("select order_id from order where reference = '" . $reference ."'");

Because (I suspect) order is a command word in mysql, the select statement fails. To make it work, the table needs to be delimited like:

$result = $this->database->getrow("select order_id from `order` where reference = '" . $reference ."'");

This got rid of my error.

User avatar
leo
admin
Posts: 4320
Joined: Sun Dec 13, 2009 8:27 am
Location: Hungary

Re: Go Live With PayPal

Post by leo » Tue Sep 18, 2012 11:40 am

I have fixed that in r147.
Unfortunately 1.2.7 does not contain this fix. Thanks for pointing out.

Post Reply