Magento google checkout integration issue 404 - magento

I'm trying to integrate google checkout with a magento site and get the following error in the Integration Console:
We encountered an error trying to access your server at
https://www.domain.co.uk/googlecheckout/api/
-- the error we got is Sending failed with HTTP response
code: 404. Response body was: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title> <style type="text/css">
<!-- body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF; background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;} -->
</style> </head> <body>
<div id="header"><h1>Server Error</h1></div>
<div id="content"> <div class="content-container"><fieldset> <h2>404 - File or directory not found.</h2>
<h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
</fieldset></div> </div> </body> </html>
As far as I can tell, it's not actually a 404 error as I can do the following:
wget --post-data=blah https://www.domain.co.uk/googlecheckout/api/
--10:58:43-- https://www.domain.co.uk/googlecheckout/api/
=> `index.html'
Resolving www.domain.co.uk... 192.168.1.117
Connecting to www.domain.co.uk|192.168.1.117|:443... connected.
HTTP request sent, awaiting response... 503 Service Unavailable
10:58:43 ERROR 503: Service Unavailable.
Now the 503 error there actually relates to me not sending any HTTP_AUTHORIZATION with wget, so it dies on this line strpos($_SERVER['HTTP_AUTHORIZATION'], " ") + 1))); in googleresponse.php. This isn't the problem.
I have tried both https://www.domain.co.uk/googlecheckout/api/ and https://www.domain.co.uk/googlecheckout/api in both wget and Google Checkout settings callback URL with the same results.
I've made sure that always_populate_raw_post_data = On is set, and it's showing up correctly in phpinfo().
I've tried debug mode On and Off in Google API settings within Magento.
The checkout process was working correctly on a dev domain using the sandbox mode.
I've tried all of the things that I could find with google searches. Any other options would be greatly appreciated.
Edit
It looks like that response is from an IIS server. The server that this site is now running on is Apache. Could Google still be accessing the old server? DNS was updated over 15 hours ago.

Check the server logs on the old and new servers to see which one Google made the request to.

That original error from google is an IIS 404 page, not an apache 404 page, so it seems as though google is looking at a different web server.

Related

AWS Lambda next.js - Failed to post 2MB file to api route

I deployed my next.js app to aws usingserverless-next.js package.
When I'm trying to post a big file (~1MB) to the api route, I'm getting a 503 response code.
The full response content:
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>503 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
The Lambda function associated with the CloudFront distribution is invalid or doesn't have the required permissions.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: X
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
The CloudWatch log shows:
{
"errorType": "Error",
"errorMessage": "Cannot call write after a stream was destroyed",
"code": "ERR_STREAM_DESTROYED",
"stack": [
"Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed",
" at WriteStream._write (internal/fs/streams.js:379:33)",
" at WriteStream.<anonymous> (internal/fs/streams.js:375:12)",
" at Object.onceWrapper (events.js:422:26)",
" at WriteStream.emit (events.js:327:22)",
" at WriteStream.EventEmitter.emit (domain.js:483:12)",
" at internal/fs/streams.js:366:10",
" at FSReqCallback.oncomplete (fs.js:156:23)"
]
}
I'm using formidable to parse the body of the request. It working with smaller file sizes.
What can I do? 1MB does not count as big file size.
In development everything works even with 10MB files, but not in AWS lambda#edge
It's written here: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
You can't have a request + response larger than 256 KB if you upload in asynchronous mode.
Because serverless is only here to make your routes in lambda functions. If you want to upload this file, you can use S3 bucket with pre-signed url.
With that you doesn't need to upload the file to the lambda function.

google spreadsheet update cells causing server error 502 when using google-drive-ruby gem v1.0.5

I update a google worksheet from a workbook using the google_drive gem.
I get the worksheet object using the below code
ws=session.spreadsheet_by_key(doc_key).worksheet_by_title(spend_sheet_name)
After changing contents of cells inside worksheet, I try to save the worksheet like so:
ws.save
I get this error while executing the ws.save command
Response code 502 for post https://spreadsheets.google.com/feeds/cells/xxxxxxxxxxxxxxx/yyyyyyyyy/private/full/batch: <!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 502 (Server Error)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}#media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}#media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}#media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>502.</b> <ins>That’s an error.</ins>
<p>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds. <ins>That’s all we know.</ins>
I tried following the instructions and setup a begin rescue block which retries ws.save after 30 seconds but I still get the same error.
Update:
this works when updating small cells ~3 to 5. But when I try to update >(300 rows X 13 columns) I get the above error.
I am using https://github.com/gimite/google-drive-ruby version 1.0.5
I also tried updating the gem to v2.0.1 but I get the same error
Can someone help me out here please.
Based from this forum, it seems that there are some problems with Drive/Docs services that's why you got server error 502. Try clearing your cache and cookies resolve. You can quickly clear your cache by refreshing your browser while holding the Shift key.
Also from this thread, if you're seeing a "Temporary Error (502)" message or other server error message when you try to access Google Docs, Sheets, or Slides, it means that your documents are temporarily unavailable. These errors generally resolve themselves within a few minutes, so please wait a bit before trying to access them again.

Cordova Https ajax requests fails or encoded response

We have developed an application which is running perfectly fine on desktop and mobile web with verisign certificate (https). We have developed iOS and android cordova application which was working fine with http server. For production they have enabled SSL. The iOS and android hybrid applications are not working fine because of ajax call response. The following response I am receiving for both http and https. Is there any changes required in client side or its all about SSL? Is there any workaround for SSL decoded response? We are using IBM's websphere application server.
Response from http server
[{"SALT":"3FzekTIywrmm9jojnfHn11"}]
Response from https server
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1"></head><body>
<script type=text/javascript>
function decode_base64(input){
var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";
var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9+/=]/g,"");
while(i<input.length){
enc1=keyStr.indexOf(input.charAt(i++));
enc2=keyStr.indexOf(input.charAt(i++));
enc3=keyStr.indexOf(input.charAt(i++));
enc4=keyStr.indexOf(input.charAt(i++));
chr1=(enc1<<2)|(enc2>>4);
chr2=((enc2&15)<<4)|(enc3>>2);
chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){
output=output+String.fromCharCode(chr2)
}
if(enc4!=64){
output=output+String.fromCharCode(chr3)}}return output;
}
document.write(decode_base64("PHNjcmlwdCB0eXBlPXRleHQvamF2YXNjcmlwdD52YXIgdG9fZGVjPWRlY29kZV9iYXNlNjQoImNtUjFWV2hzWkc1MGRTbG5kRzlpZFdodWJ5RXBLSG9oWlc1aWRHeGtiM1V2Ylc1aVlIVm9ibTg4SXk0eGUzRnZMaU02SVh3dElUQXhNVEVvIik7IGRlY19yZXM9IiI7IHZhciB4b3Jfa2V5PTE7IGZvcihpPTA7aTw2MDtpKyspeyBkZWNfcmVzKz1TdHJpbmcuZnJvbUNoYXJDb2RlKHhvcl9rZXledG9fZGVjLmNoYXJDb2RlQXQoaSkpO30gZXZhbChkZWNfcmVzKTs8L3NjcmlwdD4="));
</script>
</body>
</html>
That is quite odd way to return the error message, but your HTTPS server is telling
i18n-values: Missing value for "primaryParagraph"
You can see that by
copy-paste the HTML to text editor,
Name it like foo.html,
Open it on browser,
Open developer tools and see console where it says that.
To answer your question: from point of view of client-side coding there isn't really much difference between HTTP and HTTPS calls. Browser tends to hide those quite effectively, though the performance is in general weaker on HTTPS calls etc.

Skype Button with HTTPS website

If I display my website with HTTP everything is fine. But when I browse with HTTPS, Skype button is not rendered.
Chrome shows this error on console:
Failed to load resource: net::ERR_INSECURE_RESPONSE
https://www.skypeassets.com/i/scom/js/skype-uri.js
And my code is:
<script type="text/javascript" src="//www.skypeassets.com/i/scom/js/skype-uri.js"></script>
<div id="SkypeButton_Call_gamirasu.cave.hotel_1" style="float: right; width:85px !important; height:23px !important; margin-top:-65px;">
<script type="text/javascript">
Skype.ui({
"name": " ",
"element": "SkypeButton_Call_gamirasu.cave.hotel_1",
"participants": ["gamirasu.cave.hotel"],
"imageSize": 24
});
</script>
I couldn't find anything about using Skype with SSL on their document. Any help will be appreciated.
You need to use this specific secured (HTTPS) domain for Skype widgets:
https://secure.skypeassets.com/i/scom/js/skype-uri.js
Have you tried visiting the URL you provided ? When I try using Chrome, I get to an SSL warning, which is the explanation why you can't load this ressource.

getting a html page with SVG that works in ubuntu to display correctly in windows on firefox 5

I'm trying to get this page to display its SVG content correctly in Firefox 5 in Windows:
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<title>SVG Rich Text Editor</title>
<style type="text/css">
...
</style>
<script>
var gui //define a global varaible to pass it on between frames
</script>
</head>
<body>
<iframe id="toolbar" src ="toolbar.html" width="500px" height="50px" frameBorder="0"></iframe><br/>
<iframe id="editor" src="editor.svg" width="500px" height="500px" frameBorder="0"></iframe>
</body>
</html>
it works perfectly in Ubuntu but in Windows (Vista) when loading the page Firefox 5 asks me if I want to open or download the file instead of displaying it.
I've also tried it by using an object tag instead of an iframe tag. Again it works perfectly in Ubuntu but in Windows it wants to download a plug-in, which I don't mind except it doesn't find any.
I've checked and the HTML5 parser is automatically enabled in this version so that can't be it.
Does anyone know how to get this to work?
EDIT 3:
After changing my local server to print the header instead of doing the default get I get this when loading http://localhost:8000/editor.svg:
Host: localhost:8000
User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:6.0) Gecko/20100101 Firefox/6.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: nl,en-us;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
this is the top of in editor.svg
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
small note: there is some java script and css inside of the editor.
EDIT 4
I've created a small python program based on the one provided in the python documentation (http://docs.python.org/library/httplib.html#examples) and asked for editor.svg
to get the response header:
'date': 'Sat, 20 Aug 2011 13:30:57 GMT'
'last-modified': 'Thu, 18 Aug 2011 11:34:42 GMT'
'content-length': '1986'</br>
'content-type': 'application/octet-stream'
'server': 'SimpleHTTP/0.6 Python/2.7.2'
I believe we have now confirmed it sees the svg as an application rather then an image. Question is how do you solve this? Preferably by adding some information in the svg itself instead of messing with the server.
Sounds like your local web server is sending the wrong MIME type for .svg files on Windows. What type is it sending?
Since SVG is a graphics format, have you tried simply using
<img src="editor.svg" width="500px" height="500px">

Resources