grantjbutler / pippin

PayPal IPN Handling for Laravel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pippin

Pippin is a library for handling PayPal IPNs in Laravel.

Usage

  1. Type-hint the request in your route handler to opt-in to IPN verification:
use Pippin\IPNRequest;

class MyController extends Controller {
  
  public function ipn(IPNRequest $request) {
    // Do something.
  }
  
}
  1. Access data about the IPN to validate the notification and process it for your application.
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();
  }
  
}

About

PayPal IPN Handling for Laravel

License:MIT License


Languages

Language:PHP 100.0%