我试图在购买后获取交易ID,但它在谢谢页面上返回空
order.php
<?php
\Stripe\Stripe::setApiKey('<test token>');
$amount = 100;
$card = $_POST['stripeToken'];
// Create a Customer
$customer = \Stripe\Customer::create(array(
"source" => $card,
"email" => $email,
"description" => "Example description")
);
// Charge the Customer instead of the card
$charge = \Stripe\Charge::create(array(
"amount" => 100,
"currency" => "usd",
"customer" => $customer->id)
);
// Save the billing info
set_billing([
'customer_id' => $customer->id,
'address' => $address,
'address2' => $address2,
'city' => $city,
'state' => $state,
'country' => $country,
'postal' => $postal,
'trans_id' => $charge->id …Run Code Online (Sandbox Code Playgroud) 我想实现这一目标
- 约翰 - >子用户
- 约翰 - >子用户
- mark - > sub user
- mark - > sub user
- 戴夫 - >子用户
- 戴夫 - >子用户
但这是意料之外的输出
- 约翰 - >子用户
- 约翰 - >子用户
只有用户名john已经出现
// Get all the users
$s = $sqlConnection->query('SELECT * FROM accounts');
while ($row = $s->fetch_assoc())
{
$uarr = explode(',', $row['username']);
foreach ($uarr as $ueach)
{
// Get all the direct sales
$query = "SELECT *";
$query .= " FROM accounts ACC";
$query .= " INNER JOIN info …Run Code Online (Sandbox Code Playgroud)