PHP code example of toolani / paypal-ipn-verifier

1. Go to this page and download the library: Download toolani/paypal-ipn-verifier library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

toolani / paypal-ipn-verifier example snippets



use Toolani\Payment\Paypal\IpnVerifier;

// If you're doing this for real, autoloading would be better
(Exception $e) {
    // fatal error trying to process IPN.
    exit(1);
}

if ($verified) {
    // IPN response was "VERIFIED"
} else {
    // IPN response was "INVALID"
}

// Verification status is available as a string, too. See table below
$status = $verifier->getVerificationStatusString();