grantjbutler / pippin
Laravel Package for handling PayPal IPNs.
0.7
2020-08-28 00:48 UTC
Requires
- php: >=7.1
- laravel/framework: >=5.2
This package is auto-updated.
Last update: 2024-10-30 00:26:10 UTC
README
Pippin is a library for handling PayPal IPNs in Laravel.
Usage
- 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. } }
- 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(); } }