Page 2 of 3

Re: Paypal Shopping Cart Feature Plugin

Posted: Thu Nov 13, 2008 8:30 am
by Qphoria
if you don't have a test account, then don't use test mode. Otherwise create one.

Re: Paypal Shopping Cart Feature Plugin

Posted: Thu Nov 13, 2008 8:51 am
by SoCal
Bingo.  I just untoggled the test box and put in an order for $1 and it's taking me to the https/paypal/us
with my banking merchant account name.  :o

sweet !  .....  ooops

just got this error after everything seemed to be checking out just fine.  ( I was expecting it to take me back to my home page or order page ... ?


Configuration error: You MUST have created an order status for "Paid Unconfirmed" for every installed language. The following sql statement returned no rows select `order_status_id` from `order_status` where `name` = 'Paid Unconfirmed' and `language_id` = '1'

Re: Paypal Shopping Cart Feature Plugin

Posted: Thu Nov 13, 2008 9:07 am
by Qphoria
Thats fixed in the latest SVN version and future versions.

You can fix it on your version by entering this line in your phpmyadmin sql
INSERT INTO `order_status` (`order_status_id`, `language_id`,`name`) VALUES (NULL,'1','Paid Unconfirmed');

Re: Paypal Shopping Cart Feature Plugin

Posted: Thu Nov 13, 2008 5:05 pm
by JNeuhoff
but it's not really asking anything that would setup or refer to  my specific paypal account ... or is it merely the email address ?  I thought that was just for forwarding the orders.
OpenCart 0.7.9 and later will have the PayPal Improved module instead of the old PayPal module included in the software bundle by default.

As regards PayPal configuration: The only settings it needs is the e-mail address of your PayPal account, and whether you use the test mode or not.  This PayPal module has a better workflow behind the scenes, making better use of the callback function to verify that PayPal has actually processed the payment. Even if PayPal doesn't call back, OpenCart keeps the 'Paid Unconfirmed' order status, giving the store owner the chance to log into his PayPal account to see whether PayPal processed the payment or not.

Re: Paypal Shopping Cart Feature Plugin

Posted: Thu Nov 13, 2008 11:17 pm
by Qphoria
Can you explain that more..

with paypal improved, is the order supposed to be saved to the main order table "before" going to the external site? because that isn't happening for my site.

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 12:34 am
by JNeuhoff
with paypal improved, is the order supposed to be saved to the main order table "before" going to the external site? because that isn't happening for my site.
Ok, looking at the paypal.php this is how I understand the workflow to be:

The order is submitted to the PayPal payment gateway at 'https://www.sandbox.paypal.com/cgi-bin/webscr'. As part of this form submission with the order details, it also submits the POST variable named notify_url with a the value of a call back function: /index.php?controller=checkout_process&payment=paypal&action=callback. The user is transfered to the PayPal's payment gateway. PayPal calls the PaymentPayPal.callback function which in turns sends a _notify-validate message to PayPal to verify the payment, and when the callback function gets an VERIFIED, the order status is set to pending.

... which means: I can't see it anywhere calling the PaymentPayPal.process function, hence the cart won't be cleared? Now I am confused too .......

... few minutes later scratching my head ...
I think the PaymentPayPal.process does get called after all, because when PayPal is initially called the payment module also submits a variable named return with a value pointing to the URL of the PaymentPayPal.process function. That means the order is processed, permanently stored in the database. Not sure whether the shopping cart is cleared, can't see it anywhere doing it in the code.

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 3:22 am
by SoCal
Gents,   I set up my email as Q instructed  (apparently I set myself up with a PayPal merchant account ...which does enable non paypal members to submit  VIsa or MC. that part works great.
Changes the PayPal from /uk to /us as I was hoping.

I ran through two tests.  One as a paypal member logging in, etc.   and the other bypassing the paypal member and going to the visa/mc option.

Both orders went through successfully  (debited one account and credited the other, etc ... I checked this later)


I'll try to insert the code I got from Q above and see if it solves my problem on returning me to my homecart
upon successful  check out.




I have another queston which I will address in a separate post.

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 3:29 am
by SoCal
Following up on the two test orders I placed through Paypal.

- Neither shows up on my order file in the admin interface.

I see them on paypal and charging my card.   But the opencart interface does not reflect that I sold something and received an order ?

Sales show up fine if I choose COD.

I am almost there.



.... an hour later ... I still have to input Q's code for checkout process to fix the pop up error upon "checkout confirmation/return to shop" button . 

Perhaps that will fix my other problem below.  No sales reflected in my sales/order history on open cart.

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 5:54 am
by SoCal
Qphoria wrote: Thats fixed in the latest SVN version and future versions.

You can fix it on your version by entering this line in your phpmyadmin sql
INSERT INTO `order_status` (`order_status_id`, `language_id`,`name`) VALUES (NULL,'1','Paid Unconfirmed');

What is the path for this ?  Or do I do this on my servers control panel  ?

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 7:28 am
by SoCal
Qphoria wrote: Thats fixed in the latest SVN version and future versions.

You can fix it on your version by entering this line in your phpmyadmin sql
INSERT INTO `order_status` (`order_status_id`, `language_id`,`name`) VALUES (NULL,'1','Paid Unconfirmed');
Q,  I'm looking every where for this    phpmyadmin sql

where exactly do I find this ?

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 10:42 am
by Qphoria
phpmyadmin is another utility that comes with your site found in the cpanel. It is a database management script. You can open that, select your database, and click the sql tab and paste the sql code there

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 12:48 pm
by SoCal
when opened up my panel , I clicked the link for oc database and it opened up a tabular looking
page.  as I scroll down I see  order_status  and to the right are four ACTION choices.


BROWSE | STRUCTURE  |  INSERT |  EMPTY |  DROP

when I click the insert

(Id paste you a screen shot but thats not working for me in this post.)

a bunch of drop down field choices are displayed for

field  type function  null  value
there are fields here  and I can input data.

how do I post you a screen shot ?

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 1:23 pm
by Qphoria
Just google phpmyadmin to get a better understanding of how it works.

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 2:12 pm
by SoCal
I went to their site.  wow

I think I've almost  got it.


When you say 
INSERT INTO `order_status` (`order_status_id`, `language_id`,`name`) VALUES (NULL,'1','Paid Unconfirmed');

I found the SQL tab  and when I open the table tab for the order_status .... it it says
Run SQL query/queries on database imageart_opc01:


`order_status`   

Fields
order_status_id`
`language_id`
`name`

? #1)  you want me to insert this line  right ?

VALUES (NULL,'1','Paid Unconfirmed');

?#2) QUESTION
Where I see this
Run SQL query/queries on database imageart_opc01:

Followed by a text box where in the box it says.

SELECT * FROM `order_status` WHERE 1


Is this where I insert the line .

VALUES (NULL,'1','Paid Unconfirmed')

( if so do I replace what’s there or add it to it.  if I add to it can you give me the string exactly the way I should want it.)

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 3:13 pm
by Qphoria
LOL the sql file was designed to make things easy.. you've sure complicated it :P

See attachment.

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 3:19 pm
by Qphoria
JNeuhoff wrote: Not sure whether the shopping cart is cleared, can't see it anywhere doing it in the code.
The cart gets cleared when the return is called. It goes to checkout_process index function, which does the $cart->clear

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 3:31 pm
by SoCal
Qphoria wrote: LOL the sql file was designed to make things easy.. you've sure complicated it :P

See attachment.
I humbly apologize for my ongoing newbie questions  :'( ... but I am almost through this part.
thanks for your photo insert that helps.  now just to confirm. 

I am going to paste over the existing line in the box that reads.

[ SELECT * FROM `order_status` WHERE 1  ]

and replace with ...

[    VALUES (NULL,'1','Paid Unconfirmed')  ]

is this correct?  :-\  I anxioulsy await your response so I can give it a try.

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 3:34 pm
by Qphoria
yes

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 3:49 pm
by SoCal
Qphoria wrote: yes
well....

I pasted in  this exact text.

VALUES (NULL,'1','Paid Unconfirmed')

and I received this error message.

Error
SQL query:

VALUES (NULL , '1', 'Paid Unconfirmed'  )

MySQL said: 

#1064 - 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 'VALUES (NULL,'1','Paid Unconfirmed')' at line 1

Re: Paypal Shopping Cart Feature Plugin

Posted: Fri Nov 14, 2008 4:05 pm
by Qphoria
I'm pretty sure that's not the line i gave you.

Try the correct one from the original reply:
http://forum.opencart.com/index.php/top ... l#msg11201