我的代码是:
$customer = $mollie->customers->create([
"name" => $name,
"email" => $email,
]);
$customer->createSubscription([
"amount" => [
"currency" => 'USD',
"value" => 20.00,
],
"interval" => '2months',
"times" => 3,
"description" => $someDescription,
"webhookUrl" => $webhook,
"method" => NULL,
]);
$payment = $customer->createPayment([
"amount" => [
"currency" => 'USD',
"value" => 20.00,
],
"description" => $someDescription,
"redirectUrl" => $siteUrl,
"webhookUrl" => $webhook,
"metadata" => [
"order_id" => $orderId,
],
"sequenceType" => \Mollie\Api\Types\SequenceType::SEQUENCETYPE_FIRST,
]);
结果是:
致命错误:未捕获的异常“Mollie\Api\Exceptions\ApiException”并带有消息“执行 API 调用时出错(422:无法处理的实体):没有为客户找到合适的授权。字段:客户 ID。
是我想念的东西吗?