PHP code example of eoneopay / api-formats

1. Go to this page and download the library: Download eoneopay/api-formats 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/ */

    

eoneopay / api-formats example snippets


$formats = [
    <RequestEncoderInterface> => [<mime_type>, <mime_type>, ...]
];

// config/api-formats.php

return [
    'formats' => [
        JsonRequestEncoder::class => ['application/json'],
        XmlRequestEncoder::class => ['(application|text)/xml'],
        YourCustomerEncoder::class => ['you-custom-mime-type']
    ]
];