Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
001d0a2
add TZS currency
bajoski34 Feb 6, 2023
fdfc3bb
update avs test card
bajoski34 Feb 6, 2023
ed986e3
setup docker configuration
bajoski34 Feb 27, 2023
4e97b8b
update infrastructure settings
bajoski34 Feb 27, 2023
bf64c79
update docker-compose.yml
bajoski34 Feb 27, 2023
3f0f7cc
test: resource and test update
bajoski34 Feb 27, 2023
04bd561
handle Network, Client and Request exceptions
bajoski34 Feb 27, 2023
497d013
allow other Psr/ClientInterface implementations
bajoski34 Feb 27, 2023
32cbd7a
remove BASE_URL variable from config implementation
bajoski34 Feb 27, 2023
e3d122e
update Service.php
bajoski34 Feb 27, 2023
69c196b
feat: add CurlClient implementation
bajoski34 Feb 27, 2023
51bef9a
fix: composer.json vaild json error
bajoski34 Feb 27, 2023
5b5babd
fix: composer.json vaild json error 2
bajoski34 Feb 27, 2023
4bfafa1
add change-review workflow
bajoski34 Mar 2, 2023
2d1f37e
update AchTest
bajoski34 Mar 2, 2023
0a0c9b9
update test workflow
bajoski34 Mar 2, 2023
930a56e
remove inital workflow
bajoski34 Mar 2, 2023
5bb4738
update: distignore list
bajoski34 Mar 2, 2023
3d769d7
update: gitignore
bajoski34 Mar 2, 2023
d4aa7f3
add reference to envvariable class
bajoski34 Mar 2, 2023
19c02fc
refactor: eventHandler error reporting request
bajoski34 Mar 2, 2023
7b9996e
refactor: ApiOperation traits
bajoski34 Mar 2, 2023
bcadfdd
update ApiException Class
bajoski34 Mar 2, 2023
13e809d
update endpoint example
bajoski34 Mar 2, 2023
daff508
update phpunit configuration
bajoski34 Mar 2, 2023
6477646
update codecov on change-review workflow
bajoski34 Mar 2, 2023
392f1e8
add Makefile
bajoski34 Mar 2, 2023
ab5afbb
refactor: requeryTransaction
bajoski34 Mar 2, 2023
4df1645
update: ApiOperation get trait
bajoski34 Mar 2, 2023
f7259ef
depricated: customer and payload class
bajoski34 Mar 2, 2023
8572cbb
depricated: customer and payload factory class
bajoski34 Mar 2, 2023
5826ea1
remove test with php 8.1
bajoski34 Mar 2, 2023
8a9bd88
add test php 8.1
bajoski34 Mar 2, 2023
f78d478
add package publish workflow
bajoski34 Mar 2, 2023
e4ca54c
refactor: access env variables
bajoski34 Mar 3, 2023
e6599b1
refactor: cardEventHandler
bajoski34 Mar 3, 2023
17b5e98
add inline Js script
bajoski34 Mar 3, 2023
9631c19
add change log
bajoski34 Mar 3, 2023
ee9acfd
docs: Customer Configuration Setup
bajoski34 Mar 3, 2023
ac707e3
Add coverage limit
corneliusyaovi Mar 3, 2023
2d38ac0
update strategy for running job.
corneliusyaovi Mar 3, 2023
024593d
Add Matrix content to fetch Job name
corneliusyaovi Mar 3, 2023
2efa395
add phpinsight scripts
Abraham-Flutterwave Jun 2, 2023
9ce7734
tests: update phpunit config to use bootstrap keys
Abraham-Flutterwave Jun 2, 2023
0489eb3
ignore phpcs cache
Abraham-Flutterwave Jun 4, 2023
54bcc06
update tests
Abraham-Flutterwave Jun 5, 2023
93557d2
phpcs
Abraham-Flutterwave Jun 5, 2023
7149d42
update: setup script
Abraham-Flutterwave Jun 5, 2023
1778f58
Security and Performance Update: checkout process and callback
Abraham-Flutterwave Jun 5, 2023
2a243f6
updated examples
Abraham-Flutterwave Jun 5, 2023
0d58862
updated dependecies
Abraham-Flutterwave Jun 5, 2023
28ce945
update: README.md
Abraham-Flutterwave Jun 5, 2023
ce45a1e
update: change-review workflow
Abraham-Flutterwave Jun 6, 2023
90312f3
update: change-review workflow
Abraham-Flutterwave Jun 6, 2023
115a905
add expiry pwbt test.
Abraham-Flutterwave Jul 14, 2023
1b2a1bf
update change-review workflow
Abraham-Flutterwave Jul 14, 2023
2705628
update change-review workflow
Abraham-Flutterwave Jul 14, 2023
4c73858
update applepay test
bajoski34 Jul 17, 2023
092e6ea
update change-review workflow
bajoski34 Jul 17, 2023
e137dc9
update change-review workflow
bajoski34 Jul 17, 2023
c14aef3
update change-review workflow
bajoski34 Jul 17, 2023
deee8c0
update change-review workflow
bajoski34 Jul 17, 2023
9a3fff8
update change-review workflow
bajoski34 Jul 17, 2023
92a6516
feat: GooglePay
bajoski34 Jul 21, 2023
f606366
feat: Enaira
bajoski34 Jul 21, 2023
8b95e15
update: enaira test
bajoski34 Jul 21, 2023
0a96bdb
update GooglePay EventHandler
bajoski34 Jul 21, 2023
e0d488f
feat: FawryPay
bajoski34 Jul 22, 2023
3dc88e5
feat: TZS momo
bajoski34 Jul 24, 2023
b4256b4
update: BankAccount Service and test
bajoski34 Jul 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
docker-compose.yml
.gitignore
.github
.env.example
.env.example
.docker
Makefile
17 changes: 17 additions & 0 deletions .docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
services:
web:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
app:
build:
context: .
dockerfile: ./php/Dockerfile
db:
image: mysql:5.7
volumes:
- ./mysql:/var/lib/mysql
18 changes: 18 additions & 0 deletions .docker/nginx/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
server {
listen 80;
server_name localhost;
root /var/www/html/public;
index index.php;

location ~ \.php$ {
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location / {
try_files $uri $uri/ /index.php?$query_string;
}
}
52 changes: 52 additions & 0 deletions .docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM php:8.1-fpm-alpine as app

# Useful PHP extension installer image, copy binary into your container
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/

# Install php extensions
# exit on errors, exit on unset variables, print every command as it is executed
RUN set -eux; \
install-php-extensions pdo pdo_mysql;

# RUN docker-php-ext-install pdo pdo_mysql

# allow super user - set this if you use Composer as a
# super user at all times like in docker containers
ENV COMPOSER_ALLOW_SUPERUSER=1

# obtain composer using multi-stage build
# https://docs.docker.com/build/building/multi-stage/
COPY --from=composer:2.4 /usr/bin/composer /usr/bin/composer

#Here, we are copying only composer.json and composer.lock (instead of copying the entire source)
# right before doing composer install.
# This is enough to take advantage of docker cache and composer install will
# be executed only when composer.json or composer.lock have indeed changed!-
# https://medium.com/@softius/faster-docker-builds-with-composer-install-b4d2b15d0fff
COPY ./app/composer.* ./

# install
RUN composer install --prefer-dist --no-dev --no-scripts --no-progress --no-interaction

# copy application files to the working directory
COPY ./app .

# run composer dump-autoload --optimize
RUN composer dump-autoload --optimize

# Dev image
# This stage is meant to be target-built into a separate image
# https://docs.docker.com/develop/develop-images/multistage-build/#stop-at-a-specific-build-stage
# https://docs.docker.com/compose/compose-file/#target
FROM app as app_dev

# Xdebug has different modes / functionalities. We can default to 'off' and set to 'debug'
# when we run docker compose up if we need it
ENV XDEBUG_MODE=off

# Copy xdebug config file into container
COPY ./php/conf.d/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

# Install xdebug
RUN set -eux; \
install-php-extensions xdebug
1 change: 1 addition & 0 deletions .docker/php/conf.d/xdebug.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
xdebug.client_host = 'host.docker.internal'
78 changes: 78 additions & 0 deletions .github/workflows/change-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Review changes on Dev (Commits/PRs)

on:
push:
branches: ["dev"]
pull_request:
types:
- opened

jobs:
code-check:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [7.4, 8.1, 8.2]

env:
XDEBUG_MODE: coverage
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
ENV: ${{ secrets.ENV }}

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: xdebug

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: 'Create env file'
run: |
touch .env
echo PUBLIC_KEY=${PUBLIC_KEY} >> .env
echo SECRET_KEY=${SECRET_KEY} >> .env
echo ENCRYPTION_KEY=${ENCRYPTION_KEY} >> .env
echo ENV=${ENV} >> .env
ls -a ${{ github.workspace }}

- name: run unit tests and coverage scan
run: ./vendor/bin/pest --coverage --min=20 --coverage-clover ./coverage.xml

- name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODE_COV_TOKEN }}
files: ./coverage.xml
verbose: true

- name: push build status to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}
if: always()
46 changes: 46 additions & 0 deletions .github/workflows/package-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Pre-release

on:
release:
types: [created]

jobs:
check-docs-update:
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
php: [7.4, 8.1, 8.2]

steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
+(documentation)/*.md
*.md
CHANGE*.md
FILES: |
CHANGELOG.md

- name: log git diff
run: |
echo ${{ env.GIT_DIFF }}
echo ${{ env.MATCHED_FILES }}
echo ${{ env.GIT_DIFF_FILTERED }}

- name: Check if README.md or Doc/** is updated else exit
if: (env.GIT_DIFF == '')
run: |
echo Update documentation files and README.md before push
exit 1

- name: push build status to Slack
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
44 changes: 0 additions & 44 deletions .github/workflows/test.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,7 @@ examples/*.log
examples/endpoint/*.log
example.php
.phpunit.result.cache
.phpunit.cache
coverage.xml
.env.local
.php-cs-fixer.cache
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## 1.0.4 | 2022-11-06

This release adds support for 7.4 and above. a new workflow for old and new tests.

### Dependency updates and bugfixes

- [ADDED] Support for PHP 7.4 and above
- [ADDED] New workflow for old and new tests
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.PHONY: init
test:
@echo "Installing dependencies..."
@composer install
@echo "Installing dependencies... Done"
@./vendor/bin/pest --coverage --min=0 --coverage-clover ./coverage.xml


Loading