mollie api bancontact 失败
mollie api bancontact fail
我使用此代码是为了使用正确的付款方式。
除了 bancontact 它正在工作,当用户选择 bancontact 时显示此错误 API call failed: Error executing API call (request): The payment method is invalid.
(Bancontact 被设置为 Mollie 批准的支付选项)
有什么建议吗?
或者代码的哪一部分可能 post 感兴趣以防止 post 编写太多代码。
if($_SESSION['checkout_betaling'] == 'iDEAL') { $method = 'ideal'; }
elseif($_SESSION['checkout_betaling'] == 'Bancontact') { $method = 'bancontact'; }
elseif($_SESSION['checkout_betaling'] == 'PayPal') { $method = 'paypal'; }
elseif($_SESSION['checkout_betaling'] == 'SOFORT') { $method = 'sofort'; }
elseif($_SESSION['checkout_betaling'] == 'Belfius') { $method = 'belfius'; }
elseif($_SESSION['checkout_betaling'] == 'KBC / CBC') { $method = 'kbc'; }
elseif($_SESSION['checkout_betaling'] == 'ING HomePay') { $method = 'inghomepay'; }
elseif($_SESSION['checkout_betaling'] == 'Creditcard') { $method = 'creditcard'; }
url: mollie.php?bestel_id=$bestel_id&ordernr=$ordernr&bedrag=$bedrag&method=$method&levertijd_dagen=$levertijd_dagen
$payment = $mollie->payments->create(array(
"amount" => "{$bedrag}",
"description" => $config['bedrijf']." Bestelling {$ordernr}",
"redirectUrl" => "{$protocol}://{$hostname}{$path}/checkout_complete.php?",
"webhookUrl" => "{$protocol}://{$hostname}{$path}/mollie_update_db.php",
"method" => "{$method}",
"metadata" => array(
"bestel_id" => $bestel_id,
"ordernr" => $ordernr,
"levertijd_dagen" => $levertijd_dagen
),
));
感谢 lovelace 的帮助,我解决了这个问题:Payment method mistercash should be bancontact · Issue #187 · mollie/mollie-api-php · GitHub
我使用此代码是为了使用正确的付款方式。
除了 bancontact 它正在工作,当用户选择 bancontact 时显示此错误 API call failed: Error executing API call (request): The payment method is invalid.
(Bancontact 被设置为 Mollie 批准的支付选项)
有什么建议吗? 或者代码的哪一部分可能 post 感兴趣以防止 post 编写太多代码。
if($_SESSION['checkout_betaling'] == 'iDEAL') { $method = 'ideal'; }
elseif($_SESSION['checkout_betaling'] == 'Bancontact') { $method = 'bancontact'; }
elseif($_SESSION['checkout_betaling'] == 'PayPal') { $method = 'paypal'; }
elseif($_SESSION['checkout_betaling'] == 'SOFORT') { $method = 'sofort'; }
elseif($_SESSION['checkout_betaling'] == 'Belfius') { $method = 'belfius'; }
elseif($_SESSION['checkout_betaling'] == 'KBC / CBC') { $method = 'kbc'; }
elseif($_SESSION['checkout_betaling'] == 'ING HomePay') { $method = 'inghomepay'; }
elseif($_SESSION['checkout_betaling'] == 'Creditcard') { $method = 'creditcard'; }
url: mollie.php?bestel_id=$bestel_id&ordernr=$ordernr&bedrag=$bedrag&method=$method&levertijd_dagen=$levertijd_dagen
$payment = $mollie->payments->create(array(
"amount" => "{$bedrag}",
"description" => $config['bedrijf']." Bestelling {$ordernr}",
"redirectUrl" => "{$protocol}://{$hostname}{$path}/checkout_complete.php?",
"webhookUrl" => "{$protocol}://{$hostname}{$path}/mollie_update_db.php",
"method" => "{$method}",
"metadata" => array(
"bestel_id" => $bestel_id,
"ordernr" => $ordernr,
"levertijd_dagen" => $levertijd_dagen
),
));
感谢 lovelace 的帮助,我解决了这个问题:Payment method mistercash should be bancontact · Issue #187 · mollie/mollie-api-php · GitHub