Here is a video walkthrough (with transcript) of how to do test transactions in Collect.
Today we're going to look at using collects test while setting up a testing
environment for collect. So using Stripes, um testing
data. We can test collect and run transactions on a fake credit cards without having to um put in real credit card information.
This will allow you to test the user experience in any page redirects and thank you messaging that you have involved.
So let's get started.
It will require in collect you will go to your account and the first thing to set up a testing environment that you're going to want to do is you're going to want to either change your secret key from your live secret key or if you haven't set up your account yet and this is a brand new instance, then you're going to enter your secret key.
So the way that you find your secret key is in your stripe dashboard. We're going to view testing data, we're going to have this toggled on so you see if I turn it off, then it goes to live data and turn it on. And we're into testing data. Now from here we will have our api keys and we have a public key and we have a secret key.
So what you'll do is you will click to reveal the secret key and exposed the secret key.
So I'm going to pause and pause.
Okay, so what's the point of causing? All right, so I have my screw key and I have it copied. So I'm going to enter that into collect like to just clear that outside, know that there's no extra characters
living in there. And then I'm going to paste in my secret key you saved.
And if I refresh the page, it now says that my key is entered and if I have to change it I will change it.
I've already connected my account to hubspot. So now I should be safe to go ahead and generate a key and again we'll have to refresh the page here,give it a quick refresh and there is our new collect key.
So now this collect key um is tied to the account but it's not tied to the testing account.
So when we change the secret key to a live key we won't have to generate a new collect key so we can copy this collect key and that we're going to use when we connect our modules. So now we want to create a page.
Two things page and collect testing.
Okay. All right, so ditch that collect and card element enter that in place and collect a peak.
Remember this was from here? We copied it and we paste it in place. Now in our straight settings we're going to have test products as well. Um so we have our test publishable key. I'm going to copy that and paste took place.
We know that it's test because it says test rate in it and you can create new
products uh, in your testing environment or basically it's exactly the same as live environment.
So these are fake products. So I'm going to copy that.
Yeah, paste it in place Now remember the price I'd is the price idea of the product? It's not the product ID. That's very common mistake that people make. Um okay, so we have everything in place, we apply those changes and those changes appear to have worked. We now see the price on the button there, so give it a quick preview, open it up in a new tab and when you are testing a card, you can use any email you want. and the test card number is just a bunch of fours and twos, as long as the date is greater than today's date and the zip code doesn't matter.
This should all work. Thank you for your purchase. We have a successful transaction. Now when we go look in the, um, testing portal and we look at the sales, there is our test and let's look at the ... yep, there's the test and there is the test.
So everything worked beautifully. Awesome.