【发布时间】:2018-03-25 12:18:01
【问题描述】:
大家好,所以我正在使用他们的库使用付款方式 IDEAL 创建条带上的源,我偶然发现了这个不寻常的错误。
致命错误:来自 API 请求的 /home/ubuntu/workspace/ideal/stripe-php-4.13.0/lib/ApiRequestor.php:110 中的未捕获异常 'Stripe\Error\InvalidRequest' 和消息 'Invalid hash'第 110 行 /home/ubuntu/workspace/ideal/stripe-php-4.13.0/lib/ApiRequestor.php 中的 req_S1FAI6czFIggdC'
只有当我尝试在下面的owner 对象下添加这行代码时才会出现该错误(请参考下面我的实际代码),这会导致错误,即使它在正确的位置添加。
"address" => "Test Adress"
实际代码:
\Stripe\Stripe::setApiKey("test_key_here");
$source = \Stripe\Source::create(array(
"type" => $type,
"currency" => $currency,
"amount" => $amount,
"statement_descriptor" => $product,
"owner" => array(
"phone" => $phone,
"email" => $email,
"name" => $name,
"address" => "Test Adress" //this causes the error
),
"redirect" => array (
"return_url" => $returnUrl
),
"ideal" => array(
"bank" => $bank
)
));
【问题讨论】:
标签: php stripe-payments