在php中的mollie支付集成

问题描述 投票:1回答:2

我正在尝试将mollie网关集成到我的php应用程序中。当请求测试事务时,它将在成功付款后重定向到我的通知URL(返回URL)。事务详细信息只能访问如果我们传递事务id。如何从mollie的返回数据中获取当前事务id?

payment-gateway payment mollie
2个回答
1
投票

URL是通过POST调用的。

所以,你可以通过$_POST["id"]找到paymentid(在PHP中)

更多信息和代码示例可以在这里找到:https://www.mollie.com/en/docs/webhook


0
投票

你可以这样做: 注意get($_POST["id"])部分

/*
* Initialize the Mollie API library with your API key.
* See: https://www.mollie.com/dashboard/developers/api-keys
*/
$mollie = new Mollie_API_Client;
$mollie->setApiKey(MOLLIE_LINK);

/* Retrieve the payment's current state. */
$payment = $mollie->payments->get($_POST["id"]);
© www.soinside.com 2019 - 2024. All rights reserved.