Dear stackoverflow community,
Recently PayPal contacted me to upgrade my 'old-style' CodeIgniter e-commerce cart (an old standard paypal gateway with a simple form to related paypal endpoint) to a solution with access token and client_id + secret. I used omnipay-paypal, following a guide like this:
https://artisansweb.net/paypal-payment-gateway-integration-in-php-using-paypal-rest-api/
And everything seems working fine, but with old standard cart I used a notifyUrl to send payment post data to a controller that made something like this:
foreach ($_POST as $key => $value) {
$request .= '&' . $key . '=' . urlencode(html_entity_decode($value, ENT_QUOTES, 'UTF-8'));
}
$curl = curl_init('https://www.paypal.com/cgi-bin/webscr');
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_TIMEOUT, 120);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($curl);
If that $response
is VERIFIED, I enable related order for delivery (paid).
Issue is that notifyUrl isn't triggered at all with Omnipay and this avoids to fit the shoe.
I tried to setup notifyUrl parameter on purchase, completePurchase method, but nothing to do: no call is sent after payment confirmation and no payment data in the related $_POST object.
Someone could give me some hint or help?
I tried to force the notifyUrl in any possible way, but after transaction is complete and payment confirmed, the notifyUrl is not receiving the expected data with post.