Created
January 21, 2021 06:28
-
-
Save nickfox-taterli/e4e2cff6229c5d31a9e184e6b89d683d to your computer and use it in GitHub Desktop.
Stripe Payment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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