【发布时间】:2019-08-14 00:43:44
【问题描述】:
尝试使用 Stripe 端点/webhook 获取客户电子邮件。电子邮件地址未显示。
这是我目前得到的:
<?php
require_once('stripe/init.php');
\Stripe\Stripe::setApiKey("sk_test_xxxxxxxxxxxxxxxxxxxxxxxxx");
$input = @file_get_contents("php://input");
$event_json = json_decode($input);
$customer = $event_json->data->object->email;
$email_stripe = $customer->email;
if ($event_json->type == 'charge.failed') {
}
if ($event_json->type == 'charge.succeeded') {
}
?>
【问题讨论】:
标签: php json stripe-payments endpoint