Everything seems fine up until the last step. I checked the Stripe logs (by logging into Stripe), and i can see that the payment is successful but in NSBasic the Stripe1.onTransactionComplete function is never called.
The only real difference between my code and the sample is that i used
require_once('/StripeFiles/stripe-php/init.php');
at the start of the PHP file (as i downloaded the Stripe files to my server) instead of
I just tried the sample here. It worked fine, which makes me think there are some other differences in your app. (Have you tried the sample yourself).
I did notice a couple of things that looked odd.
The referrer policy message sounds like something is misconfigured on your server. Stripe support might be able to help you with that.
The stripeCheckout.open warnings look like some sort of misconfiguration of your account. It works properly in the sample.
The warning about using a legacy version of Stripe also points to a configuration issue. Your API version is set on the Developer page of the Stripe Dashboard:
Yes, i based all my testing on the sample.
I have the same Stripe API version as you.
Maybe if you can mention exactly what you changed from the sample, i can see if i can do the same with my API keys.
I inserted my testing public and secret key with the sample.
Which Stripe files did you add to your server for the first part of the php file? (require ‘/usr/home/nsbasic/scripts/stripe/vendor/autoload.php’; )
I finally received a response from Stripe today and they’ve asked for a bit more info.
In the mean time, i’ve had more of a play with the Stripe sample.
@ghenne, i don’t really understand how you didn’t change the sample to make it work. Besides using your keys, how did you add the Stripe files to your server? Did you use Composer than add those files to your server?
I added the files created below from Composer to my server.
So i finally got it working. I had to change a number of things on my server side and the sample to make it work. Even now, there a still a few warnings that i need to query Stripe about. Messy but finally got there.