jmsa-developer/yii2-transpay

A component to communicate with the transpay payment platform

dev-master 2020-10-13 23:38 UTC

This package is auto-updated.

Last update: 2025-04-14 09:41:17 UTC


README

Componente del framework Yii2 para la integración con la API de Transpay

Install Install via Composer:

composer require jmsa-developer/yii2-transpay or add

"jmsa-developer/yii2-transpay" : "*" to the require section of your composer.json file.

Configuring

Global Component

use jmsadeveloper\components\Transpay;

// ... 'components' => [ // setup component 'Transpay' => [ 'class' => Transpay::classname(), 'environment' => Transpay::ENVIRONMENT_DEMO, 'token_demo' => 'token_demo_example', ] ]

or

'components' => [ // setup component 'Transpay' => [ 'class' => Transpay::classname(), 'environment' => Transpay::ENVIRONMENT_PROD, 'token_prod' => 'token_prod_example', ] ]

Once you have setup the component, you can refer it across your application easily:

$transpay = Yii::$app->transpay; $countries = $transpay->getCountries();