import CheckoutIntents from 'checkout-intents';
const client = new CheckoutIntents({
apiKey: "RYE/staging-ec7a06d0ba5647ee824a",
});
// Step 1: Create checkout intent + poll until awaiting confirmation
const intent = await client.checkoutIntents.createAndPoll({
productUrl: "https://flybyjing.com/collections/shop/products/the-big-boi",
quantity: 1,
buyer: {
firstName: "John",
lastName: "Doe",
email: "john.doe@example.com",
phone: "212-333-2121",
address1: "123 Main St",
city: "New York",
province: "NY",
postalCode: "10001",
country: "US",
},
});
// Step 2: Review offer details (price, shipping, taxes)
console.log("Offer:", intent.offer);
// Step 3: Confirm with payment + poll until completed
const completedIntent = await client.checkoutIntents.confirmAndPoll(intent.id, {
paymentMethod: {
type: "stripe_token",
stripeToken: "tok_visa",
},
});
// Step 4: Handle result
if (completedIntent.state === "completed") {
console.log("Order placed successfully!", completedIntent);
} else if (completedIntent.state === "failed") {
console.error("Order failed:", completedIntent.failureReason);
}
穿亞曼尼的中醫長篇小說11
跳至主要內容
11. 夜仍深沈,唐雲漢卻突然驚醒。 「我剛才在做什麼?」他看著身邊的珍妮佛,熟睡地像一個小女孩,甜美的臉龐上帶著一絲滿足的微笑。 可是,唐雲漢卻陷入深深的迷惑。珍妮佛是一個很吸引人的女人,她的美麗,她的能力,她的崇拜,無不打動唐雲漢的心。然而剛剛他卻對她一點也不溫柔,一點也不憐惜,似乎把幾個月來的壓抑及被人出賣的憤怒,全都發洩在珍妮佛嬌小的身軀上,放縱似的狂野,伴隨著極度的歡愉和佔有。唐雲漢覺得自己是如此的自私,如此的失去理智,如此的不像那個自我克制能力極強的唐雲漢。 他不否認他喜歡珍妮佛,然而,此刻他卻想到另一個女人。 唐雲漢拿起一頁旅館的信紙,撕下長條的那邊,折了一顆星星,那是她教他的。她曾送給他一罐裝滿了三百六十六個紙星星的玻璃瓶,祝福他每一天都好運。當他知道那是她一個個折出來的時候,他的一顆心就再也沒有給過別的女人。 唐雲漢在星星旁寫了一句話。 「珍妮佛,謝謝妳,在我最需要安慰的時候,給了我一個難忘的夜晚。」 唐雲漢輕輕地吻了珍妮佛的臉頰一下,悄悄地離開了房間。
import CheckoutIntents from 'checkout-intents';
const client = new CheckoutIntents({
apiKey: "RYE/staging-ec7a06d0ba5647ee824a",
});
// Step 1: Create checkout intent + poll until awaiting confirmation
const intent = await client.checkoutIntents.createAndPoll({
productUrl: "https://flybyjing.com/collections/shop/products/the-big-boi",
quantity: 1,
buyer: {
firstName: "John",
lastName: "Doe",
email: "john.doe@example.com",
phone: "212-333-2121",
address1: "123 Main St",
city: "New York",
province: "NY",
postalCode: "10001",
country: "US",
},
});
// Step 2: Review offer details (price, shipping, taxes)
console.log("Offer:", intent.offer);
// Step 3: Confirm with payment + poll until completed
const completedIntent = await client.checkoutIntents.confirmAndPoll(intent.id, {
paymentMethod: {
type: "stripe_token",
stripeToken: "tok_visa",
},
});
// Step 4: Handle result
if (completedIntent.state === "completed") {
console.log("Order placed successfully!", completedIntent);
} else if (completedIntent.state === "failed") {
console.error("Order failed:", completedIntent.failureReason);
}
留言
發佈留言