簡體   English   中英

使用PHP API從Stripe對象獲取16位卡號?

[英]Get 16 digit card number from stripe object using php api?

我想在付款成功后存儲條對象的16位卡號,並在用戶下一次付款后使用它。 用戶可以輕松地選擇卡號並要求提供cvc等等,例如facebook支付系統。 只是我想存儲$card 16對象的16位代碼而不是最后4位代碼。 這是獲取最后4位數字的對象。 當我print_r($customer); 它不顯示16號。僅顯示最后4個數字。

$card = $customer->sources->data[0];
$Stripe_card=$card->last4;

你不能 該網站不提供有關該卡的所有信息,因為這是不必要的,並且會構成詐騙威脅。 在API文檔中,我們將找到共享信息的示例。

"source": {
"id": "card_1BLoXK2eZvKYlo2CUZoDPXh1",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": null,
"address_zip_check": null,
"brand": "Visa",
"country": "US",
"customer": "cus_BjH5X2utr6sBXS",
"cvc_check": null,
"dynamic_last4": null,
"exp_month": 8,
"exp_year": 2019,
"fingerprint": "Xt5EWLLDS7FJjR1c",
"funding": "credit",
"last4": "4242",
"metadata": {
},
"name": null,
"tokenization_method": null
},

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM