PHP code example of vulcandigital / silverstripe-paypalwebhook
1. Go to this page and download the library: Download vulcandigital/silverstripe-paypalwebhook 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/ */
vulcandigital / silverstripe-paypalwebhook example snippets
use Vulcan\PayPalWebhook\Handlers\PayPalEventHandler;
class CustomerDisputeHandler extends PayPalEventHandler
{
private static $events = [
'CUSTOMER.DISPUTE.CREATED'
];
public static function handle($event, array $data)
{
// $event is the string identifier of the event
return "Do something here";
}
}