ddroche / yii2-shasta
Yii2 Shasta Payments Integration
Installs: 105
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Open Issues: 2
Type:yii2-extension
Requires
- tigrov/intldata: ^1.1
- yii2mod/yii2-enum: ^1.7
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-httpclient: ^2.0
Requires (Dev)
- codeception/codeception: ^4.0
- codeception/module-asserts: ^1.1
- codeception/module-yii2: ^1.0
- codeception/specify: ^1.2
This package is auto-updated.
Last update: 2024-10-16 04:32:55 UTC
README
Yii2 Shasta Payments Integration
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist ddroche/yii2-shasta "*"
or add
"ddroche/yii2-shasta": "*"
to the require section of your composer.json
file.
Configuration
Once the extension is installed, simply config it in your application:
<?php return [ 'components' => [ 'shasta' => [ 'class' => 'ddroche\shasta\Shasta', // Develop Enviroment 'apiEndPoint' => 'https://api-sandbox.payments.shasta.me/v1', // Production Enviroment 'apiEndPoint' => 'https://api.payments.shasta.me/v1', // Your Production or Development Enviroment API Key 'apiKey' => 'Bearer key_...', ], ] ];
Usage
$address = new ddroche\shasta\resources\Address(); $address->line_1 = 'Avenida Omejos, 5'; $address->line_2 = 'Atico 2a'; $address->postal_code = '08291'; $address->city = "L'Hospitalet de Llobregat"; $address->region = 'Barcelona'; $address->country = 'ES'; $customer = new ddroche\shasta\resources\Customer(); $customer->first_name = 'Javier'; $customer->last_name = 'Hernandez'; $customer->email_address = 'javi@example.com'; $customer->phone_number = '123456789'; $customer->nationality = 'ES'; $customer->employment_status = 'self_employed'; $customer->address = $address; if ($customer->save()) { // code is save } else { // code is not save }
Class Resources whit functions
Project (GET, SET)
Accounts (All, Create, Read, Update)
Transactions (All, allAccountsTransactions, Read)
Customers (All, Create, Read, Update)
Transfers (All, Create, Read, Update)
CardTokens (Create, Read)
Cards (All, Create, Read, Update)
CardPayins (All, Create, Read, Update, Finish)
CardPayinsRefunds (All, Create, Read, Update)
CardVerifications (All, Create, Read, Update, Finish)
BankAccounts (All, Create, Read, Update)
BankPayinReferences (All, Create, Read, Update)
BankPayins (All, Read, Update)
BankPayout (All, Create, Read, Update)