PHP code example of dansmaculotte / mondialrelay-php

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

    

dansmaculotte / mondialrelay-php example snippets


use DansMaCulotte\MondialRelay\DeliveryChoice;

$delivery = new DeliveryChoice(
    [
        'site_id' => MONDIAL_RELAY_SITE_ID,
        'site_key' => MONDIAL_RELAY_SITE_KEY,
    ]
);

$result = $delivery->findPickupPoints('FR', '75001', 'FR');

print_r($result);

use DansMaCulotte\MondialRelay\DeliveryChoice;

$delivery = new DeliveryChoice(
    [
        'site_id' => MONDIAL_RELAY_SITE_ID,
        'site_key' => MONDIAL_RELAY_SITE_KEY,
    ]
);

$result = $delivery->findPickupPointByCode('FR', '062049');

print_r($result);
 bash
composer