Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quentinbontemps/laravelmondialrelay
A Laravel package for dealing with Mondial Relay API (http://api.mondialrelay.com)
https://github.com/quentinbontemps/laravelmondialrelay
laravel mondial-relay mondialrelay-api php
Last synced: 3 months ago
JSON representation
A Laravel package for dealing with Mondial Relay API (http://api.mondialrelay.com)
- Host: GitHub
- URL: https://github.com/quentinbontemps/laravelmondialrelay
- Owner: QuentinBontemps
- License: mit
- Created: 2018-05-31T09:04:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-15T07:10:35.000Z (over 5 years ago)
- Last Synced: 2024-10-14T13:36:18.973Z (3 months ago)
- Topics: laravel, mondial-relay, mondialrelay-api, php
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 6
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Client to use the MondialRelay API
## Description
This package uses [QuentinBontemps/php-mondialrelay-api](https://github.com/QuentinBontemps/php-mondialrelay-api).This client allow to use the [Mondial Relay Soap API](https://api.mondialrelay.com/Web_Services.asmx) with Laravel.
## Requirements
- PHP >= 5.6
- php-soap extension## Installation
```bash
composer require quentinbontemps/laravel-mondialrelay
```If you're on Laravel 5.4 or earlier, you'll need to add the following to your ```config/app.php``` :
```php
'providers' => [
// ...
\QuentinBontemps\LaravelMondialRelay\LaravelMondialRelayServiceProvider::class,
],
```## Configuration
You need configure your MondialRelay ids :
You have two solutions :
- ```.env``` :
- MONDIAL_RELAY_ENVIRONMENT=demo|prod (DEFAULT : demo)
- MONDIAL_RELAY_SITE_ID=xxx
- MONDIAL_RELAY_SITE_KEY=xxx
- MONDIAL_RELAY_WSDL=XXX (DEFAULT : https://api.mondialrelay.com/Web_Services.asmx?WSDL)
- publish config file :
```bash
php artisan vendor:publish --tag=laravel_mondialrelay_config
```## Usage
```php
use QuentinBontemps\LaravelMondialRelay\Facades\LaravelMondialRelay;$client = LaravelMondialRelay::client();
$shops = $client->findDeliveryPoints([
'Pays' => 'FR',
'Ville' => 'Paris',
'CP' => '75000',
'DelaiEnvoi' => "0",
'RayonRecherche' => '20',
'NombreResultats' => '10',
]);
```## Contribution
Contributions are always welcome.