Skip to content

notifyUrl doesn't work! #264

@MarcoHijacker

Description

@MarcoHijacker

Dear omnipay-paypal 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions