PHP code example of zenepay / laravel-infobip

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

    

zenepay / laravel-infobip example snippets


use Zenepay\Infobip\Facades\Infobip;

$person = Infobip::getPerson('[email protected]', 'EMAIL');

$people = Infobip::getPeople(limit: 1000, page: 1);

Infobip::updatePerson('[email protected]', 'EMAIL', [
    'firstName' => 'Ada',
    'lastName' => 'Lovelace',
    'customAttributes' => [
        'Member ID' => '111222555',
        'Member Tier' => 'C1',
        'Point' => 305,
    ],
]);

Infobip::batchUpdatePeople([
    [
        'identifier' => '[email protected]',
        'type' => 'EMAIL',
        'customAttributes' => [
            'Member ID' => '12345',
            'Point' => 110,
        ],
    ],
]);

Infobip::sendEventPurchase([
    'email' => '[email protected]',
    'paymentType' => 'online',
    'transactionType' => 'TS',
    'productName' => 'Bag',
    'brandCode' => 'EXAMPLE',
    'netSale' => 1500,
    'outletCode' => 'STORE1',
    'quantity' => 1,
    'price' => 1500,
]);

Infobip::sendPeopleEvent('[email protected]', 'EMAIL', 'purchase', [
    'productName' => 'Bag',
    'quantity' => 1,
]);

Infobip::sendEventReferralRedeem([
    [
        'email' => '[email protected]',
        'referralCode' => 'REF1',
        'rewardCode' => 'RW1',
    ],
]);
bash
php artisan vendor:publish --tag=infobip-config