Skip to content

Instantly share code, notes, and snippets.

@nickfox-taterli
Created January 21, 2021 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickfox-taterli/e4e2cff6229c5d31a9e184e6b89d683d to your computer and use it in GitHub Desktop.
Save nickfox-taterli/e4e2cff6229c5d31a9e184e6b89d683d to your computer and use it in GitHub Desktop.
Stripe Payment
from flask import Flask,request
app = Flask(__name__)
@app.route('/pay')
def pay():
return ('''
<head>
<title>Checkout</title>
<script src="https://js.stripe.com/v3/"></script>
<script>
var stripe = Stripe('pk_test_xxxxxxxxxxxx');
stripe.confirmAlipayPayment("''' + request.args.get("id") + '''", {
return_url: `http://api.test.alipay.net/`,
})
</script>
</head>
''')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment