0
嗨即時通訊只是嘗試條紋,我碰到一個問題,即時試圖創建一個新的客戶與表格提供的電子郵件(即時通訊使用嵌入式結賬),但IM無法檢索與新創建的客戶一起發送的電子郵件值。它總是空的。任何幫助將不勝感激條紋 - 創建客戶使用電子郵件從結帳頁
在此先感謝!
形式:
<form action="/payment" method="POST">
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key="pk_test_---------------------"
data-amount="15000"
data-name="WetWired"
data-description="Widget"
data-billing-address="true"
data-zip-code="true"
data-shipping-address="true"
data-locale="auto">
</script>
</form>
節點
app.post('/payment', function (req, res) {
console.log("posted");
// Get the credit card details submitted by the form
var token = req.body.stripeToken; // Using Express
var email = req.body.email;
stripe.customers.create({
source: token,
plan:"tv_subscription",
email : email
}).then(function(customer) {
return stripe.charges.create({
amount: 15000, // Amount in cents
currency: "cad",
description: 'android box',
customer: customer.id
});
}).then(function(charge) {
// YOUR CODE: Save the customer ID and other info in a database for later!
});
});
而不是'email'你可能在尋找'stripeEmail'? https://stripe.com/docs/checkout#integration-simple-parameters – Adamjstevenson
@Adamjstevenson就是這樣!杜洛爾感謝很多人:) – jordan