I have set up a simple Wordpress site with an order form but I'm struggling to get the site to recognise Sage Pay.
I've been following the initial instructions in the PHP integration kit - http://www.sagepay.co.uk/support/find-an-integration-document/direct-integration-documents:
Create a database and add the necessary tables.
Edit the /lib/config.php and the /demo/config.php to include my Sagepay Account and database details
In the test server for Sage Pay I also added the IP address of my site as an exception.
Every time I run the https://mywebsite.com/demo it returns the error:
Ooops!!!
An unexpected error seems to have occurred.
Try to refresh the page or you can contact us if the problem persist.
This is pretty early on in the but I seem to be doing something wrong. Is there something else that needs edited as the instructions are frustratingly vague.
Would I be better just using a Sagepay Direct plug in with Wordpress e-commerce solutions?
Thanks.
I am also a currently frustrated Sagepay learner. To asnswer you question, I had this problem too. My problem was that i had the database details incorrect. I had my local host details on my test environment, and i had not changed the details correctly in demo/config.php before ftp the file to my webserver. Once i did this, i got over the oops screen. The next problem was that i got a blank screen when running index.php from demo. I was told by sagepay that apache needs restarting as a service everytime somethingortheother happens. So on my local environment i restarted all services in wamp and it worked. I can now see the demo (not that i know what to do now as there are no instructions and the php is hidden in a complex class structure with the html content in some tpl files which i have never seen before - of course there are no instructions in the integration kit at all). Anyway back to the answer. So locally i can run the demo, but i still have white screen on my webserver, becuase i can't restart the apache service there, so that is the next problem. I will keep trying and add anything useful later.
I also had this problem, I had not given the database user account the necessary permissions to access the database.
Related
I work for a company that has a store built on Magento and hosted in AWS, the version we are currently on is 2.3.4. For a few weeks now the website has been producing an error in the console which comes into effect when a customer wants to check out the items in their cart. They can add the item, proceed to check out, enter their shipping information, and when they confirm their shipping information the following error appears when they are on the credit card information page:
Uncaught ReferenceError: Unable to process binding "if: function({
return(addressOptions.length > 1) }"
Message: addressOptions is not defined
at if (eval at createBindingsStringEvaluator (knockout.min.js:280), <anonymous>:3:55)
at ko.computed.disposeWhenNodeIsRemoved (knockout.min.js:376)
at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.min.js:208)
at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.min.js:204)
at Function.evaluateImmediate (knockout.min.js:202)
at Object.ko.computed.ko.dependentObservable (knockout.min.js:193)
at init (knockout.min.js:376)
at knockout.min.js:312
at Object.ignore (knockout.min.js:140)
at knockout.min.js:312
I've been given the task of remedying the problem. It should be said that the website was made by a freelance developer with whom the company no longer has ties. So it is fair to say that I have no idea what to do. My thoughts are to create a staging site, implement solutions from other people who faced the same issue, fix the problem, push changes into production and be the Hero the office needs, but doesn't deserve. yay.
This brings me to my second batch of problems. I have SSHd into the server and I can not locate the application directory to copy so that I may create a staging site. Heck, I don't even know If there is an application dir. The website is hosted on AWS, I have looked online for tutorials and documentation about Magento file structure but have returned defeated.
What do I want from this forum? Help. lots of help. I would like help with:
Why is this error being triggered?
Where can I locate the source code for the Magento site and how can I copy it to my local machine. I've found that SCP seems to be the most efficient method.
After I copy where do I find the Models, Views, and Controller folders? I have zero experience with PHP but I am not intimidated to learn. (I have some experience with Angular and Django frameworks.)
After I make the changes how do I push the changes to the live site? Can I use git? How?
I request detail. Lots and lots of detail with links and examples would be great.
Thank you! And I look forward to all the help
So I have a very simple form with just 2 fields that submits on the staging site, tested and got my clients to test and everything was fine.
Uploaded exactly the same code to the live site and it works for me but my clients just get the same empty form after submitting instead of the intended thank you message that should be showing in its place...there are no error messages and I can't seem to replicate this anywhere other than on the live site and i don't want to turn debugging mode on there.
I have also checked the host for error logs but unfortunately the host doesn't seem to have this feature.
How do I debug this or any information as to why it wouldn't be working would be super helpful.
I have gotten clients to hard refresh and clear browser cache. They have tried on multiple machines and in different places with the same result.
If you would like to take a look the staging site is here: http://ams.staging.gooi.ltd/
It's the Newsletter Sign Up button in the top left. This has been working for everyone that has tried though....like I said...only seems to not work on the live site for some people.
I'm trying to use a HTML/PHP form on my website. The problem is submit just opens a new page displaying my php as text, this is when I open the html file on my computer using Google Chrome. When I uploaded to my hosting service, TK dot com, I get a 405 error when using the form. I've tested on working/downloadable php forms and the same thing happens.
From my understanding, I can't just use php on my site without setting up an environment. I've read I need to use some sort of program to do this (apache). Which kind of confuses me further, how would I enable this type of service, which installs to my computer, to run on my website when my computer is off?
Any tips or guides on how to do use apache for PHP forms on my website or similar that I can be redirected to would be really helpful. Please let me know if any extra information is needed.
I'm trying to hoost a website on Microsoft Azure and I did it. But when I enter in my website to a .php page the browser answer with the next error message: "The page cannot be displayed because an internal server error has occurred."
Before that, it returned a 500 error code, but searching the internet I tried to configure de Handler Mappings option (I dont know if I did it good or not, but now that is the new error message).
Is there any required configuration I have to do in order to make .php pages work? I have the "shared" payment plan, Do I need a better payment plan in other to do it?
Thank you!
When I knew there wasnt any extra configuration to run PHP I realized that the only one thing I changed was the Handler Mapping options, so I disabled it and tried with a simple phpinfo() in a index.php .
Exactly, the error was a bad php code. Thank you very much.
NOTE: Other person said me how to get logs for php 500 errors, you can find how to do it HERE.
Ensure that PHP is enabled for you Azure Web App. Go to the Web App in the Azure Portal, click Settings and then Application Settings. There is a dropdown labeled PHP version. Make sure it is not set to "Off" (select your preferred version). Then select Save.
I'm relatively new to programming and am having trouble with using OAuth with my app hosted on Amazon Beanstalk.
What I wish my app to do is to connect to the Constant Contact API, using the base code shown here
https://github.com/shannon7wallace/OAuth-2-PHP-Example
If I execute this code locally, everything works fine. I am able to login with my constant contact credentials and pull data. I was sure to setup my redirect uri in my constant contact developer key correctly, and everything works perfectly locally.
When I deployed it to AWS however, I would get a blank page when trying to navigate to index.php. I double checked my container settings and the zip package I uploaded to ensure I was pointing to the correct directories, and made sure my AWS healthcheck pointed to a publicly accessible URL (AWS shows app as being healthy), but the page is blank.
If I replace my index.php with simply HTML or even phpinfo(), it works. I suspect it gets hung up at the authentication check but even if I hard code my account credentials in and remove the login logic, I still get a blank page. Even the html outside my php script tags does not display, regardless if I include things like or other head tags.
Googling for OAuth + Beanstalk produces very little, and the constantcontact API documentation, at least to my inexperienced eyes, is pretty sparse, but the closest thing I could find addressing my problem is this
https://forums.aws.amazon.com/thread.jspa?messageID=277339񃭛
The scenario in the above thread seems to address a problem much more specific than mine, and I am unsure on how to apply the solution to my particular case.
Is there something obvious I am missing? I can't believe AWS would be unsuited for apps using OAuth considering the vast array of projects that are hosted on it.
I appreciate any help anyone can offer.
The Beanstalk container options for PHP have an option to control whether errors should be displayed; switching it to "On" should write a fatal error on your page.
As it turns out, even after changing the setting, the pages would still be blank. I'm not sure if the feature is broken, but it definitely guards you from accidentally leaving it on :)
You'd have to log into your instance (assuming your site isn't loaded yet and it's really just one) and edit your code to insert the customary debug statements as high up as possible:
error_reporting(-1);
ini_set('display_errors', 'On');
Barring any parse errors in your page, it will show the offending error.