meithal / mondial-relay-bundle
Mondial Relay Bundle for Symfony 5 and 6
This package's canonical repository appears to be gone and the package has been frozen as a result.
Fund package maintenance!
ernadoo
Installs: 168
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 1
Type:symfony-bundle
Requires
- php: ^7.1 || ^8.0 || ^8.1
- quentinbontemps/php-mondialrelay-api: ^1.0
- symfony/framework-bundle: ^5.0 || ^6.1
- symfony/profiler-pack: *
This package is auto-updated.
Last update: 2023-09-18 02:30:26 UTC
README
Description
This package uses QuentinBontemps/php-mondialrelay-api.
This client allow to use the Mondial Relay Soap API with Symfony.
Installation
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
$ composer require ernadoo/mondial-relay-bundle
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require ernadoo/mondial-relay-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
// config/bundles.php return [ // ... Ernadoo\MondialRelayBundle\ErnadooMondialRelayBundle::class => ['all' => true], ];
Step 3: Configure the Bundle
# config/packages/ernadoo_mondial_relay.yaml ernadoo_mondial_relay: api: wsdl: https://api.mondialrelay.com/Web_Services.asmx?WSDL options: trace: '%kernel.debug%' #keep_alive : false #cache_wsdl : !php/const WSDL_CACHE_NONE credentials: customer_code: secret_key: brand_id:
Usage
# src\Controller\DefaultController.php <?php namespace App\Controller; use MondialRelay\ApiClient; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; class DefaultController extends AbstractController { public function findDeliveryPoints(ApiClient $mondialRelayClient) { $shops = $mondialRelayClient->findDeliveryPoints([ 'Pays' => 'FR', 'Ville' => 'Paris', 'CP' => '75000', 'DelaiEnvoi' => "0", 'RayonRecherche' => '20', 'NombreResultats' => '10', ]); } }
Contribution
Contributions are always welcome.