1
votes

I am trying to integrate mollie gateway in my php application.When request for test transaction it will redirect to my notification url(return url) after successful payment. The transaction details can be only accessable If we pass the transaction id.How i get the current transaction id from the return data of mollie?

2

2 Answers

1
votes

The URL's are called via POST.

So, the paymentid can you find via $_POST["id"] (in PHP)

More information and code samples can be found here: https://www.mollie.com/en/docs/webhook

0
votes

You can do that like this:
Notice the get($_POST["id"]) part

/*
* 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"]);