I am an iOS developer looking to add Stripe payment to one of my apps. I have created a page on my SSL site which hosts the suggested code from the below link:
https://stripe.com/docs/charges
When I try to process a payment, I receive a 'forbidden (403)' error. Can anyone please advise what I could be doing wrong? All of the code in my Ruby file is as follows:
stripe.api_key = "MySecretKeyGoesHere"
token = request.POST['stripeToken']
try:
charge = stripe.Charge.create(
amount=1000, # amount in cents, again
currency="gbp",
source=token,
description="Example charge"
)
except stripe.error.CardError, e:
# The card has been declined
pass
There are examples for this in many major languages, I am happy to use any of them but am currently trying the Ruby and Python versions.