Skip to content

Commit

Permalink
Merge branch 'zota:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasantonov authored Nov 1, 2024
2 parents 419e191 + 7bde415 commit 9f89e01
Show file tree
Hide file tree
Showing 93 changed files with 1,473 additions and 1,418 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
14 changes: 7 additions & 7 deletions .github/workflows/ci-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.3', '7.4', '8.0']
operating-system: [ubuntu-latest, macos-latest] #, windows-latest ]
php-versions: ['8.1', '8.2', '8.3']
fail-fast: false
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -35,13 +35,13 @@ jobs:
tools: phpunit

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/php-quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '8.2'
extensions: mbstring, intl, dom, fileinfo, curl
ini-values: post_max_size=256M
coverage: xdebug
Expand All @@ -38,7 +38,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand All @@ -54,7 +54,7 @@ jobs:
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
8 changes: 3 additions & 5 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ on:

jobs:
phpcs:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.2'
extensions: mbstring, intl, curl
ini-values: post_max_size=256M
coverage: xdebug
Expand All @@ -38,7 +36,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/release-creator.disabled

This file was deleted.

31 changes: 11 additions & 20 deletions .github/workflows/sdk-release.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,29 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
- 'v*'

name: SDK Release

jobs:
build:
name: SDK Release Creation
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Get version
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
env:
REPO: ${{ github.repository }}
- name: Prepare repository
run: |
git config --global --add safe.directory /github/workspace
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.vars.outputs.tag }}
release_name: Release ${{ steps.vars.outputs.tag }}
body: |
${{ steps.Changelog.outputs.changelog }}
draft: false
prerelease: false
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
./vendor/**
.phpunit.cache/*
vendor/**
composer.lock
coverage.xml
phpunit.xml
zotapay-php-sdk-*.zip
phpunit.xml.dist.bak
Zota-php-sdk-*.zip
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
[![codecov](https://codecov.io/gh/zotapay/php-sdk/branch/master/graph/badge.svg?token=6M6BPB0HYP)](https://codecov.io/gh/zotapay/php-sdk)
[![action](https://github.com/zotapay/php-sdk/workflows/PHP%20Quicktest/badge.svg?branch=master)](https://github.com/zotapay/php-sdk/actions)
[![action](https://github.com/zotapay/php-sdk/workflows/SDK%20CI%20Matrix%20Build/badge.svg?branch=master)](https://github.com/zotapay/php-sdk/actions)
[![action](https://github.com/zotapay/php-sdk/workflows/PHP%20PSR%20Enforcer/badge.svg?branch=master)](https://github.com/zotapay/php-sdk/actions)
[![codecov](https://codecov.io/gh/zota/php-sdk/branch/master/graph/badge.svg?token=6M6BPB0HYP)](https://codecov.io/gh/zota/php-sdk)
[![PHP Quicktest](https://github.com/zota/php-sdk/actions/workflows/php-quicktest.yml/badge.svg)](https://github.com/zota/php-sdk/actions/workflows/php-quicktest.yml)
[![SDK CI Matrix Build](https://github.com/zota/php-sdk/actions/workflows/ci-matrix.yml/badge.svg)](https://github.com/zota/php-sdk/actions/workflows/ci-matrix.yml)
[![PHP PSR Enforcer](https://github.com/zota/php-sdk/actions/workflows/phpcs.yml/badge.svg)](https://github.com/zota/php-sdk/actions/workflows/phpcs.yml)

![php-github](https://user-images.githubusercontent.com/174284/106497899-5149e980-64c7-11eb-8b6d-92311dac8df4.jpg)
![php-sdk](https://github.com/user-attachments/assets/10eb7dd9-778c-4419-8322-8180d67373f7)

# Official Zotapay PHP SDK

This is the official page of the [Zotapay](https://www.zotapay.com) PHP SDK. It is intended to be used by developers who run modern PHP applications and would like to integrate our next generation payments platform.

# Official Zota PHP SDK

This is the official page of the [Zota](https://www.zota.com) PHP SDK. It is intended to be used by developers who run modern PHP applications and would like to integrate our next-generation payments platform.

## Introduction
PHP SDK provides all the neccessary methods for integrating the Zotapay Merchant API. This SDK is used by clients, as well as all the related eCommerce plugins for mainstream PHP applications.
PHP SDK provides all the neccessary methods for integrating the Zota Merchant API. This SDK is used by clients, as well as all the related eCommerce plugins for mainstream PHP applications.

## Requirements
- A functioning Zotapay Sandbox or Production account and related credentials
- A functioning Zota Sandbox or Production account and related credentials
- PHP version 7.2.0 or greater
- Client URL Library (cURL) version 7.34.0 or greater
- JSON extension enabled

## Usage

### Main configuration
After all the files are loaded configuration is needed. This can be done with the static methods provided in Zotapay class. Configuration includes:
After all the files are loaded configuration is needed. This can be done with the static methods provided in Zota class. Configuration includes:
- Credentials
- API url - test or production environment
- Endpoint
Expand All @@ -43,7 +45,7 @@ First the data object has to be created and all the needed data setup with the s
After that the request class (ex. Deposit) is created and the request method is called with the data object as parameter.

### Retrieving the response
Every request method returns response object with available getters. In every response object are included getters providing the code, the message and the data as they are received from the API. Also in every response object are included getters for the body of the response, the HTTP code and the JSON. All other getters are request specific and are available for easier usage of the response further.
Every request method returns response object with available getters. In every response object are included getters providing the code, the message and the data as they are received from the API. Also in every response object are included getters for the body of the response, the HTTP code and the JSON. All other getters are request-specific and are available for easier usage of the response further.

### Callback and Merchant redirect handlers
Classes for callbacks and redirects handling are available with the corresponding getters:
Expand Down Expand Up @@ -76,7 +78,7 @@ Logging:
- `logger.php` - DefaultLogger usage

## Resources
The Zotapay API guide can be found on the official API Documentation pages for [deposit](https://doc.zotapay.com/deposit/1.0/) and [payout](https://doc.zotapay.com/payout/1.0/) operations.
The Zota API guide can be found on the official API Documentation pages for [deposit](https://doc.zota.com/deposit/1.0/) and [payout](https://doc.zota.com/payout/1.0/) operations.

## Support
This SDK is supported by Zotapay. For sign-up and sales inquiries, please contact sales@zotapay.com. For Support, please use support@zotapay.com and include customer identifiable information, along with a description of the issue.
This SDK is supported and maintaned by Zota. For sign-up and sales inquiries, please contact sales@zota.com. For Support, please use support@zota.com and include customer identifiable information, along with a description of the issue.
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ The officially supported version of the SDK is as follows:

## Reporting a Vulnerability

Disclosure of vulnearbilities and security-related inquiries should be done via security@zotapay.com.
Disclosure of vulnearbilities and security-related inquiries should be done via security@Zota.com.
10 changes: 10 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*** Zota PHP SDK Changelog ***

2024-03-21 - v1.1.2
* customerBankAccountNumber parameter added to Deposit

2020-08-26 - v1.1.1
* Sensitive data removed from logs

2020-08-26 - v1.1.0
* Initial release
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "zotapay/php-sdk",
"description": "Zotapay PHP SDK",
"name": "zota/php-sdk",
"description": "Zota PHP SDK",
"type": "library",
"authors": [
{
"name": "Zota Technology Ltd.",
"email": "support@zotapay.com",
"homepage": "https://www.zotapay.com"
"email": "support@zota.com",
"homepage": "https://www.zota.com"
}
],
"autoload": {
"psr-4": {
"Zotapay\\": "lib/"
"Zota\\": "lib/"
}
},
"require": {
Expand All @@ -20,12 +20,12 @@
"ext-json": "*"
},
"require-dev": {
"squizlabs/php_codesniffer": "3.5.5",
"phpunit/phpunit": "^9.2"
"squizlabs/php_codesniffer": "3.7.2",
"phpunit/phpunit": "^10"
},
"support": {
"email": "support@zotapay.com",
"homepage" : "https://www.zotapay.com"
"email": "support@zota.com",
"homepage" : "https://www.zota.com"
},
"license": "APACHE-2.0"
}
Loading

0 comments on commit 9f89e01

Please sign in to comment.