如何使用Mollie API检索Bancontact的QR码?

问题描述

我正在向Mollie发送新的付款,其中包含QR码(https://docs.mollie.com/reference/v2/payments-api/create-payment#)的附寄:

$payment = $mollie->payments->create([
        "amount" => [
              "currency" => "EUR","value" => $rows['inst_prijs_wespen'] // You must send the correct number of decimals,thus we enforce the use of strings
        ],"description" => "Wespenverdelging - ".$rows['inst_zone_naam'],"redirectUrl" => "https://".$rows['inst_url']."/mollie/processpayment.PHP?id=".$interventie_id,"webhookUrl" => "https://".$rows['inst_url']."/mollie/webhook.PHP","method" => "bancontact","Metadata" => [
                "interventie_id" => $interventie_id
        ],],[
        "include" => "details.qrCode"
    ]
);

付款已正确创建(QR码除外)。

但是如文档(https://docs.mollie.com/guides/qr-codes中所述),“详细信息”中未提供QR数据

amount: {value: "48.40",currency: "EUR"}
amountCaptured: null
amountrefunded: null
amountRemaining: null
applicationFeeAmount: null
authorizedAt: null
canceledAt: null
countryCode: null
createdAt: "2020-11-01T18:29:50+00:00"
customerId: null
description: "******"
details: null
expiredAt: null
expiresAt: "2020-11-01T19:29:50+00:00"
FailedAt: null
id: "********"
isCancelable: false
locale: null
mandateId: null
Metadata: {*****}
method: "bancontact"
mode: "live"
orderId: null
paidAt: null
profileId: "*******"
resource: "payment"
restrictPaymentMethodsToCountry: null
sequenceType: "oneoff"
settlementAmount: {value: "48.40",currency: "EUR"}
settlementId: null
status: "open"
subscriptionId: null
_embedded: null}

我在做什么错了?

解决方法

似乎API有问题。莫莉会检查一下

,

如果您使用的是 mollie 测试环境,Mollie 不会添加二维码,只有 live 才会在“详细信息”中包含二维码