Skip to content

psr18-adapter/mangopay-php-sdk-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psr18-adapter/mangopay-php-sdk-v2

Install

Via Composer

composer require psr18-adapter/mangopay-php-sdk-v2

Usage

$api = new \MangoPay\MangoPayApi();
$api->setHttpClient(
    new \Psr18Adapter\Mangopay\MangopayPsr18Client(
        $api, 
        $psr18Client,
        $psrRequestFactory,
        $psrUriFactory, 
        $psrStreamFactory
    )
);

Usage with teknoo/mango-pay-bundle

services:
    mangopay.sdk.http_client:
      class: Psr18Adapter\Mangopay\MangopayPsr18Client
      arguments:
          $root: '@mangopay.sdk.mango_pay_api.service'
    # This is not technically required. Define only if you are logging all requests in your http client, 
    # so don't need mangopay client's stock logging. We are redefining original service to avoid setLogger call.
    mangopay.sdk.mango_pay_api.service:
      class: '%mangopay.sdk.mango_pay_api.class%'
      calls:
        - [setHttpClient, ['@mangopay.sdk.http_client']] 

Licensing

MIT license. Please see License File for more information.

About

PSR-18 adapter for mangopay/php-sdk-v2

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages