ddroche / yii2-shasta
Yii2 Shasta Payments Integration
Package info
github.com/ddanielroche/yii2-shasta
Type:yii2-extension
pkg:composer/ddroche/yii2-shasta
dev-master
2020-05-29 07:13 UTC
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: 2026-02-16 07:38:28 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)