PHP code example of grantjbutler / pippin

1. Go to this page and download the library: Download grantjbutler/pippin 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/ */

    

grantjbutler / pippin example snippets


  use Pippin\IPNRequest;
  
  class MyController extends Controller {
    
    public function ipn(IPNRequest $request) {
      // Do something.
    }
    
  }
  

  use Pippin\IPNRequest;
  
  class MyController extends Controller {
    
    public function ipn(IPNRequest $request) {
      $ipn = $request->getIPN();
      // $ipn is an instance of Pippin\IPN.
      $payerEmail = $ipn->getPayerEmail();

      $transaction = $ipn->getTransactions()[0];
      $receiverEmail = $transaction->getReceiver();
    }
    
  }