Zen Cart Logo
Forums / Addon Payment Modules / Checkout by Amazon Zen Cart Plug-in

Checkout by Amazon Zen Cart Plug-in

Views: 135,599

Results 81 to 100 of 350
19 Sep 2010, 2:41 PM
#81
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Checkout by Amazon Zen Cart Plug-in

Boggled:

I'm still getting the 500 error on my cron job, but everything seems to be passing back and forth between Seller Central and Zen like it should.

I'm having the same experience as boggled. I am getting an error from my Cron job(permission denied), but CBA seems to be working correctly(as far as I can test in sandbox, I haven't tried production yet). Is the Cron job serving any function when IOPN is enabled? Is it just a backup in this case?

I am using Zen 1.3.9.f and I'm hosted on Godaddy. I have contacted Godaddy about the permission denied error, but they have not been able to shed any light on this problem.

Do you have any ideas on where to look for the cause of the permission denied error?

Thanks.

Bill

20 Sep 2010, 5:34 AM
#82
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

bpryor:

I'm having the same experience as boggled. I am getting an error from my Cron job(permission denied), but CBA seems to be working correctly(as far as I can test in sandbox, I haven't tried production yet). Is the Cron job serving any function when IOPN is enabled? Is it just a backup in this case?

I am using Zen 1.3.9.f and I'm hosted on Godaddy. I have contacted Godaddy about the permission denied error, but they have not been able to shed any light on this problem.

Do you have any ideas on where to look for the cause of the permission denied error?

Thanks.

Bill

Did you make the edit to your spiders file in the includes directory that I mentioned removing the line "wget" from the file?

Also can you copy/paste the exact error message from your log as well as the cache directory as well?

20 Sep 2010, 7:33 AM
#83
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

retched:

Did you make the edit to your spiders file in the includes directory that I mentioned removing the line "wget" from the file?

Yes, I did, thank you, but that wasn't it. I just tracked down the "permission denied" error through a post I found with a Google search. If you don't specify which app you want to run your script it defaults to Shell, and when a php script is run as a Shell script it evidently produces that error. Unfortunately this did not end my problems. I tried about a dozen different ways to format the script command line and none of them worked correctly. After reading many posts in other places the one I ended up using that appeared to be exactly the way other people had gotten cron jobs to run on GoDaddy, but it didn't work for the Amazon script. The line I ended up with was:

/web/cgi-bin/php5 "$HOME/html/checkout_by_amazon.php?action=Everything" -O /dev/null 

and the error that returned was as follows:

Status: 404 Not Found
Content-type: text/html

No input file specified.

Anyway I ended up trying another suggestion I found which was as follows:

/usr/bin/curl http://www.mysite.com/checkout_by_amazon.php?action=Everything -O /dev/null 

This returns the following and I have no idea if this means it's working or not.

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

Thanks for your help.

Bill

21 Sep 2010, 6:08 AM
#84
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

bpryor:

Yes, I did, thank you, but that wasn't it. I just tracked down the "permission denied" error through a post I found with a Google search. If you don't specify which app you want to run your script it defaults to Shell, and when a php script is run as a Shell script it evidently produces that error. Unfortunately this did not end my problems. I tried about a dozen different ways to format the script command line and none of them worked correctly. After reading many posts in other places the one I ended up using that appeared to be exactly the way other people had gotten cron jobs to run on GoDaddy, but it didn't work for the Amazon script. The line I ended up with was:

/web/cgi-bin/php5 "$HOME/html/checkout_by_amazon.php?action=Everything" -O /dev/null

> ```
Status: 404 Not Found
Content-type: text/html

No input file specified.
```Anyway I ended up trying another suggestion I found which was as follows:
> 
> ```
/usr/bin/curl http://www.mysite.com/checkout_by_amazon.php?action=Everything -O /dev/null 
```This returns the following and I have no idea if this means it's working or not.
> ```
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
```Thanks for your help.
> 
> Bill

It looks like to me that it does work. A successful load returns a 0 length log file since there is no output from /checkout_by_amazon.php?action=Everything except a blank page. If there was an error, you'd obviously have to download something.
21 Sep 2010, 7:15 AM
#85
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

retched:

It looks like to me that it does work. A successful load returns a 0 length log file since there is no output from /checkout_by_amazon.php?action=Everything except a blank page. If there was an error, you'd obviously have to download something.

You could be right. I think it's moot anyway as long as IOPN is working, so I'll probably really only find out if the cron job is working correcly if IOPN fails at some point.

Thanks.

Bill

21 Sep 2010, 3:51 PM
#86
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

bpryor:

Anyway I ended up trying another suggestion I found which was as follows:

/usr/bin/curl http://www.mysite.com/checkout_by_amazon.php?action=Everything -O /dev/null

> 
> This returns the following and I have no idea if this means it's working or not.
> ```
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

Thanks for your help.

Bill

I tried this one, and this is what I'm getting now:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

100 392 100 392 0 0 58263 0 --:--:-- --:--:-- --:--:-- 58263
100 392 100 392 0 0 57251 0 --:--:-- --:--:-- --:--:-- 0

curl: (3) <url> malformed

I'm assuming the 'curl: (3) <url> malformed' means something still isn't quite right with mine. Any suggestions? :)

I'll finish that project tomorrow, I've made enough mistakes today!

21 Sep 2010, 11:09 PM
#87
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

Boggled:

I tried this one, and this is what I'm getting now:

I'm assuming the 'curl: (3) <url> malformed' means something still isn't quite right with mine. Any suggestions? :)

Did you input the correct URL in the proper format with quotes and all? I'm not too familiar with GoDaddy hosting unfortunately.

23 Sep 2010, 11:31 PM
#88
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

I did my first test live(production) order and everything with the order went smoothly. The order went through, I receive all notifications, it shows up in seller central, and the proper status updates and the Confirm Shipped and Cancel Order buttons appeared in the product order detail page. Since it is a test order I clicked on the Cancel button, then I was asked to confirm if I wanted to cancel and I said yes, then I was returned to the Order List page and that was it. I went back into the product order detail page and there was no update to the status saying it was cancelled or in the process of being cancelled and I went to seller central and there is no evidence of the cancellation there. What should the process be at this point and what should I see?

23 Sep 2010, 11:34 PM
#89
fmckinnon avatar

fmckinnon

New Zenner

Join Date:
Jul 2006
Posts:
84
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

bpryor,

  1. Is your cron job setup and running?
  2. The updates aren't instantaneous ... typically, in the comments area, it will say that the cancel status request is being processed, etc., it may take a while before this is populated back and forth between Amazon and your shopping cart - depending on the timing of your cron job.

(PS: I'm usually the guy on here asking questions, trying to give back and answer some now .. but if my info is wrong, just let me know!)

23 Sep 2010, 11:48 PM
#90
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

fmckinnon:

bpryor,

(PS: I'm usually the guy on here asking questions, trying to give back and answer some now .. but if my info is wrong, just let me know!)

Thanks for giving back. :smile:

I actually thought of that and if you read any of my previous posts I've been struggling with cron setup....but as I've brought up, and unfortunately not been answered, I don't think the cron job has a purpose if you're using IOPN(which I am), except as a backup means of processing. I will keep checking to see if anything updates, but I think it's something more than that.

typically, in the comments area, it will say that the cancel status request is being processed, etc.,

That's what I'd expect, but there is no update of status on the order details page.

Thanks again, I'll report back if I find a solution.

Bill

24 Sep 2010, 3:26 AM
#91
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

UPDATE:

Don't spend any time on my issue I posted earlier, as I've found the issue and it's now just a matter of finding the correct solution. This might end up being of interest to other people. I'm using the Super Orders mod and so far everything has worked perfectly with it, but this problem is directly related to the use of that mod. I will report back more when I find a fix. I can tell it's doable, but doing it right is going to take some time.

24 Sep 2010, 3:37 AM
#92
amazonpayments avatar

amazonpayments

New Zenner

Join Date:
Oct 2009
Posts:
52
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

bpryor:

I did my first test live(production) order and everything with the order went smoothly. The order went through, I receive all notifications, it shows up in seller central, and the proper status updates and the Confirm Shipped and Cancel Order buttons appeared in the product order detail page. Since it is a test order I clicked on the Cancel button, then I was asked to confirm if I wanted to cancel and I said yes, then I was returned to the Order List page and that was it. I went back into the product order detail page and there was no update to the status saying it was cancelled or in the process of being cancelled and I went to seller central and there is no evidence of the cancellation there. What should the process be at this point and what should I see?

Did you get the cancellation IOPN? the order cancellation is notified via IOPN or cron job does pull the report and updates it.

make sure both are in working condition.

24 Sep 2010, 4:07 AM
#93
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

AmazonPayments:

Did you get the cancellation IOPN? the order cancellation is notified via IOPN or cron job does pull the report and updates it.

make sure both are in working condition.

Hi,

No, I didn't get any IOPN notifications and it's because of the Super Orders' bug I mentioned in my last post, plus, I have no idea how to tell if my cron job is working or not. I think it may be working now, but as I posted in an earlier post about my cron jobs, I don't know if my latest result using CURL means it's working or not. If there's a way to test if cron is actually doing what it's supposed to, that would be great.

Also, I'd really like clarification about IOPN and Cron. Is it true that when you're using IOPN that the cron job is just a backup if IOPN fails and is serving no function if IOPN is working correctly?

Now the solution to my Super Orders problem, which I solved very easily and it seems to be working perfectly, but it's a real hack. Again, if you are using Super Orders you will have to do what I did, or something similar, to make this work.

In checkout_by_amazon_admin.php search for "FILENAME_ORDERS".

Existing code:

//ajaxFunction();
 // -->
</script>
<? echo zen_draw_form('amazon_payments', FILENAME_ORDERS, zen_get_all_get_params(array('action')) . 'action=doVoid', 'post', '', true) . zen_hide_session_id(); ?>

The constant FILENAME_ORDERS is changed from 'orders' to 'super_orders" when Super Orders is installed. The problem is that super_orders.php does not contain the switch statement "doVoid" that the Amazon checkout code is calling, it's only in orders.php. So all I did was take the constant out and hard-coded 'orders' in the function call.

New Code:

//ajaxFunction();
// -->
</script>
<? echo zen_draw_form('amazon_payments', 'orders', zen_get_all_get_params(array('action')) . 'action=doVoid', 'post', '', true) . zen_hide_session_id(); ?>

This seems to be working perfectly. I was able to Cancel my order with the display in the order details page updating immediately saying it was processing the cancel, and when it was completed it correctly updated the ZC order detail page and it was also correct in Amazon Seller Central saying it was cancelled successfully.

24 Sep 2010, 5:30 AM
#94
amazonpayments avatar

amazonpayments

New Zenner

Join Date:
Oct 2009
Posts:
52
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

bpryor:

Hi,

No, I didn't get any IOPN notifications and it's because of the Super Orders' bug I mentioned in my last post, plus, I have no idea how to tell if my cron job is working or not. I think it may be working now, but as I posted in an earlier post about my cron jobs, I don't know if my latest result using CURL means it's working or not. If there's a way to test if cron is actually doing what it's supposed to, that would be great.

Also, I'd really like clarification about IOPN and Cron. Is it true that when you're using IOPN that the cron job is just a backup if IOPN fails and is serving no function if IOPN is working correctly?

Now the solution to my Super Orders problem, which I solved very easily and it seems to be working perfectly, but it's a real hack. Again, if you are using Super Orders you will have to do what I did, or something similar, to make this work.

In checkout_by_amazon_admin.php search for "FILENAME_ORDERS".

Existing code:

//ajaxFunction();
// -->
</script>

<? echo zen_draw_form('amazon_payments', FILENAME_ORDERS, zen_get_all_get_params(array('action')) . 'action=doVoid', 'post', '', true) . zen_hide_session_id(); ?>
> 
> The constant FILENAME_ORDERS is changed from 'orders' to 'super_orders" when Super Orders is installed.  The problem is that super_orders.php does not contain the switch statement "doVoid" that the Amazon checkout code is calling, it's only in orders.php.  So all I did was take the constant out and hard-coded 'orders' in the function call.
> 
> New Code:
> ```
//ajaxFunction();
// -->
</script>
<? echo zen_draw_form('amazon_payments', 'orders', zen_get_all_get_params(array('action')) . 'action=doVoid', 'post', '', true) . zen_hide_session_id(); ?>

This seems to be working perfectly. I was able to Cancel my order with the display in the order details page updating immediately saying it was processing the cancel, and when it was completed it correctly updated the ZC order detail page and it was also correct in Amazon Seller Central saying it was cancelled successfully.

The plugin is tested with only vanilla zencart source.

Regarding CRON / IOPN,

IOPN works for the following

  1. New Order notification
  2. Cancel order notification
  3. Order ready to ship notification

Cron job works for the following

  1. Pull order reports xml from Amazon servers
  2. confirm shipment of pending orders
  3. cancel a order
  4. refund a order

Order creation in zencart is through IOPN / CRON. if IOPN fails, report pulled by cron is used.

Everything can be tracked in two tables (use your table prefix)
amazon_payments
amazon_order_history

amazon_order_history maintains the state of the order which is being displayed in the order detail page.

CRON job should be used for most of the operations. IOPN will be useful for inventory update instantly whereas cron takes time. order reports in amazon is generated based on the scheduled time.

Hope it is clear.

24 Sep 2010, 6:01 AM
#95
bpryor avatar

bpryor

New Zenner

Join Date:
Sep 2009
Posts:
48
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

AmazonPayments:

The plugin is tested with only vanilla zencart source.

Yes, I wouldn't expect anymore. It would be impossible to test with all possible combinations of mods, particularly order related mods.

AmazonPayments:

CRON job should be used for most of the operations. IOPN will be useful for inventory update instantly whereas cron takes time. order reports in amazon is generated based on the scheduled time.

Hope it is clear.

Yes, that helps a lot. Thank you for the detailed explanation. I think from this my Cron job must be working as all aspects of the mod appear to be working now.

Bill

26 Sep 2010, 8:43 PM
#96
boggled avatar

boggled

Zen Follower

Join Date:
Mar 2006
Location:
Tennessee
Posts:
286
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

retched:

Did you input the correct URL in the proper format with quotes and all? I'm not too familiar with GoDaddy hosting unfortunately.

This is what I have in my Cron job:

/usr/bin/curl [url]http://www.mysite.com/checkout_by_amazon.php?action=Everything[/url] -O /dev/null

No quotation marks at all, 'mysite' of course replaced with my actual domain name.

I'm not hosted on GoDaddy - thankfully. :)
I'm on Camelot.

I'll finish that project tomorrow, I've made enough mistakes today!

27 Sep 2010, 6:18 AM
#97
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

Boggled:

This is what I have in my Cron job:

/usr/bin/curl [url]http://www.mysite.com/checkout_by_amazon.php?action=Everything[/url] -O /dev/null

> 
> No quotation marks at all, 'mysite' of course replaced with my actual domain name.
> 
> I'm not hosted on GoDaddy - thankfully.  :)
> I'm on Camelot.

Does your host provide access to wget?
27 Sep 2010, 11:53 PM
#98
ehinchman avatar

ehinchman

New Zenner

Join Date:
Jul 2008
Posts:
19
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

Hi everyone. We are considering installing this. Are the bugs worked out? Are you happy you installed it? Are people using it?:blink:

28 Sep 2010, 5:20 AM
#99
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Location:
Bronx, New York, United States
Posts:
949
Plugin Contributions:
3

Re: Checkout by Amazon Zen Cart Plug-in

ehinchman:

Hi everyone. We are considering installing this. Are the bugs worked out? Are you happy you installed it? Are people using it?:blink:
It does indeed work. Just need to be careful of a few quirks, a full update hasn't been uploaded yet with the fixes discussed here.

28 Sep 2010, 7:40 PM
#100
scatzc avatar

scatzc

New Zenner

Join Date:
Sep 2009
Posts:
79
Plugin Contributions:
0

Re: Checkout by Amazon Zen Cart Plug-in

AmazonPayments:

The Checkout by Amazon team has released an updated version of the Zen Cart plug-in.
For: Version 1.3.9e
Will it work with version 1.3.8a too? If not, how difficult is it to tweak it to fit an operational 1.3.8a store?