stripe a similar object exists in test mode, but a live mode key was used to make this request - stripe-payments

This is less a question and more of an answer to this issue that caused me several hours of aggravation. I did find the solution online but not in a direct or easy place.
It turns out that the problem actually had nothing to do with whether I was using test or live keys on my site.
I had deployed my code to heroku, updated my env to match the live keys and received the error listed in the title of this thread.
The solution is actually pretty simple and the problem actually exists in stripe not my code.
I had defined Subscription Plans in test, I then had to create new plans for the live version (no import ability, but that is a frustration for another day).
The problem is that you actually have to go back into your test plans, temporarily rename them, and then rename them back.
So if I have Plan-A in test and I create Plan-A in live, I then need to rename Plan-A in test to something else like Plan-A1. Then I can rename it back to Plan-A and Stripe then works properly.
Anyway, I hope this solves the issues for others because it is really annoying to try to figure out what is wrong and blaming your code is not always the case.

Related

SSH client behaviour changed since private key implementation

I've just changed our authentication methods for connecting via SSH as we're moving into production for our app, we're also in the middle of migrating to EC2#AWS.
Its been a few days now and I've started to notice a few little changes whcih seem small but none the less, causing me to make mistakes as we run through command lines.
We disabled root logins to start with and now working on a range of users, all with different keys etc.
We no longer get our login 'introduction' when we login. We had some pretty useful information on there which we enjoyed reviewing - Where is that stored and how do we get it back or rebuild it?
We cant 'tab' to autocomplete the filenames anymore. This probably saves us tens of hours a week in typing so would be nice to get this back.
Im sure theres a configuration file somewhere but the files I've reviewed give little to no clue on either of these issues.

Azure App Services Web App not registering update

I have a Azure App Service app that I'm trying to get deployed.
Today I ran into an issue where .NET informed me (via the yellow screen of death when I browse to the URL of my app) that I had a missing DLL (for the purposes of this question I don't think it really matters).
I used FileZilla to publish my changes in an attempt to do a manual deployment first and then work my way to automate it.
After so many attempts to fix it I later realized that the error message never changed. I did something more severe and renamed my bin folder into something completely different and the exact same error message would appear.
I've stopped the service, restarted it, and as mentioned, renamed folders, etc. and still the exact same error message persisted.
I also decided to open up the Azure Portal Console for my App Service app to browse a bit and to my amazement, nothing seemed to have reflected at all. The FTP shows one thing and the Console shows another.
Would anyone have any idea as to why this is happening?
I eventually got it to work and I will share what I tried.
I deleted the web app and created it again (I found this to be important the first time around). This was quite time consuming and did help but it wasn't long before the same problem happened again.
Then I finally found a solution that seems to give me consistent results:
I kept on editing the Web.config which seems to force a recompile and clear some sort of cache. So each time the web app stopped updating, I would make a slight change in the Web.config, upload it via FTP and the app finally updates.
If anyone has any more details on this, it would be greatly appreciated.

Codeigniter - No Data Received - Not Chrome related

I've found plenty of versions of this questions, but neither seem to go further than an apparent Google Chrome bug.
What happens is that whenever I copy a codeigniter setup to a new folder on my server, to start a new project based on it, I get "no data received" in any browser I try it on.
The strange part is that the problem is solved if I go into each file that gets include()-d, add or change something irrelevant (like a blank space) and save the file. I don't know why, but this makes that specific include() work. Otherwise, the script stops before it.
There's nothing logged in the server's access or error logs so I can't figure out what the problem might be.
Needless to say this has been driving me crazy. Any suggestions?
Thanks!
My sysadmin figured it out. It was related to system wide APC cache. I used apc_clear_cache() at the top of index.php and everything works like a charm!

Difference in output on Azure

I've run into a little problem here. What I get on my local environment and my cloud result is different... I've tried using IntelliTrace, but everytime I want to debug a track it gives me a No source available message.
There aren't any exceptions or anything like that, everything loads perfectly fine... it just seems like the 4th case of the switch-case is screwed. I'm using 4 const ints in a static Common.cs file to populate these 4 possibilities; I know I could be using an enum, but it shouldn't really matter, right?
If this helps, I am also using Telerik's RadChart control. In other words, these 4 options manipulate the data in 4 different ways. People have told me that there is no way to debug code hosted within Azure, and that I could probably use Azure Diagnostics and keep tracing every few lines or so...
Does anyone have any pointers on which direction I should go? or have faced similar problems before? Many thanks... I am pretty much clueless in here.
EDIT: The problem lay with the localization on Azure. On my local machine the date format is dd/mm/yyyy, whereas on Azure it is mm/dd/yyyy. Hence, the problem arose...
It seems to me you're using a web role. If that's the case, the quickest way to explore differences between local deployment and azure deployment is to enable Web Deploy on your cloud project.
Once you've done that, use the Publish option on the Web project (NOT on the cloud project) to quickly upload your code changes to Azure, and explore doing old-fashioned Response.Write.
Ugly, but quite efficient when you don't get what's happening.
Pierre

How to work collaboratively on a website

I'm working on a website with some other people. Usually when we want to modify something, we do the change on our machine and just upload the new version with ftp, hope it'll works (or that nobody will notice it doesn't the time we correct it) and that's it.
It's already not the best way to work alone but even less to work collaboratively so I'm asking advices.
I think that a solution like svn/git/mercurial could help me. I found bitbucket which allows free private repository with mercurial. But still after, how can I upload the changes I did to the ftp and make sure the version I've on my computer is the same than the one on the server.
We are all doing it during our free time (not paid) and some people comes and leave every year so I'm looking for something free, easy to use (explain to everyone why we should use a DVCS is already hard) and which doesn't rely on a specific person.
The server we are using to host the website is a cheap one and doesn't allow the use of ssh, svn,...
Thank you
Version control will not help with the issue you are describing - namely, uploading untested changes to a production site.
What you (and your team) need, is better quality control procedures - you need a test website and a tester (QA) person. The process would be:
Make a change
Update the test website
Have the update and the whole website signed off by QA
Update the production/live site
What you will gain by using version control (CVS, SVN, Git or anything else) is recoverability - you will be able to go back to a version before any breaking change. It will still not solve the issue of "the new code broke the site".
You want scheduled releases.
Commit and update code regularly
Code freeze or develop in a branch and merge to the trunk
test on a staging environment
Find a bug goto step 1
Release
You need to understand that what represents your latest correct working build is not what's on the server but in your source repository whether that be SVN or just the file system. Anything as long as it isn't the live server! Make sure everything works locally as expected then unless the site is huge (I guess not given your situation) deploy it in its entirety as a single version.

Resources