Skip to content

Commit

Permalink
wip: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ging-dev committed Jul 10, 2024
1 parent 52dafb8 commit 20780c2
Show file tree
Hide file tree
Showing 39 changed files with 589 additions and 1,290 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yaml]
indent_size = 2
14 changes: 14 additions & 0 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: static analysis

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

jobs:
tests:
uses: laravel/.github/.github/workflows/static-analysis.yml@main
24 changes: 24 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Tests

on: ["push", "pull_request"]

jobs:
ci:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
tools: composer:v2
coverage: xdebug

- name: Install Dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader

- name: Tests
run: ./vendor/bin/pest
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
vendor
tools
test.php
*.cache
*.txt
*.lock
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## IPay Unoffical Client

```php
<?php

declare(strict_types=1);

use IPay\IPayClient;

require __DIR__.'/vendor/autoload.php';

$ipay = IPayClient::create();

try {
$session = $ipay->guest()->login([
'userName' => 'yourUsername',
'accessCode' => 'yourPassword'
]);

foreach ($session->historyTransactions([
'accountNumber' => $session->customer->accountNumber,
'startDate' => new \DateTimeImmutable('-5 days'),
]) as $transaction) {
echo $transaction->remark.PHP_EOL;
}
} catch (Throwable $e) {
echo $e->getMessage();
}
```
17 changes: 12 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,37 @@
"type": "library",
"license": "MIT",
"autoload": {
"classmap": ["src"]
"classmap": ["src"],
"files": ["src/functions.php"]
},
"authors": [
{
"name": "ging-dev",
"email": "[email protected]"
}
],
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php-http/httplug": "^2.4",
"php-http/client-common": "^2.7",
"nette/utils": "^4.0",
"league/object-mapper": "dev-main"
"eventsauce/object-hydrator": "^1.4",
"symfony/options-resolver": "^7.1",
"symfony/dom-crawler": "^7.1",
"phpseclib/phpseclib": "^2.0",
"symfony/var-exporter": "^7.1"
},
"require-dev": {
"php-http/curl-client": "^2.3",
"nyholm/psr7": "^1.8",
"phpstan/phpstan": "^1.11"
"phpstan/phpstan": "^1.11",
"pestphp/pest": "^2.34"
},
"config": {
"allow-plugins": {
"php-http/discovery": true
"php-http/discovery": true,
"pestphp/pest-plugin": true
}
}
}
Loading

0 comments on commit 20780c2

Please sign in to comment.