Skip to content

Commit

Permalink
add checkout onebuy packages base
Browse files Browse the repository at this point in the history
  • Loading branch information
xxl4 committed Nov 8, 2024
0 parents commit 54db027
Show file tree
Hide file tree
Showing 27 changed files with 814 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Laravel

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
laravel-tests:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3]
laravel: ['6.*','7.*','8.*','9.*', '10.*', '11.*']
# exclude php 8.1 with laravel 11.* and php 8.3 with laravel 9.*
exclude:
- php: 8.1
laravel: 11.*
- php: 8.3
laravel: 9.*
- php: 8.0
laravel: 11.*
- php: 8.0
laravel: 10.*
- php: 7.2
laravel: 11.*
- php: 7.2
laravel: 10.*
- php: 7.2
laravel: 9.*
- php: 7.2
laravel: 8.*
- php: 7.2
laravel: 7.*
- php: 7.3
laravel: 11.*
- php: 7.3
laravel: 10.*
- php: 7.3
laravel: 9.*
- php: 7.4
laravel: 11.*
- php: 7.4
laravel: 10.*
- php: 7.4
laravel: 9.*

name: 'PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}'

steps:
- uses: actions/checkout@master

# Configure PHP
- name: Select PHP version
uses: shivammathur/setup-php@master
with:
php-version: '${{ matrix.php }}'
extensions: mbstring, pdo_sqlite, fileinfo, gd
coverage: none

# Configure NPM
- uses: actions/setup-node@v1
with:
node-version: '16.x'

# Install PHP dependencies
- name: Install Composer dependencies
run: composer require "illuminate/support:${{ matrix.laravel }}"

# Display installed laravel version
- name: Show laravel version
run: composer show laravel/framework

# # Install NPM dependencies
# - name: Install Dependencies
# run: npm install

# # Build static assets
# - name: Compile Assets
# run: npm run prod

# Run phpunit tests
- name: Run tests
run: ./vendor/bin/phpunit
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [2024] [Nexa Merchant]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# NexaMerchant/CheckoutOneBuy

# How to Install


```
NexaMerchant\CheckoutOneBuy\Providers\CheckoutOneBuyServiceProvider::class,
```
Add it to config/app.php $providers

# How to Publish

```
composer require nexa-merchant/checkoutonebuy
```
40 changes: 40 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "nexa-merchant/checkoutonebuy",
"license": "MIT",
"type": "library",
"description" : "CheckoutOneBuy Apps",
"authors": [
{
"name": "Steve",
"email": "[email protected]"
}
],
"require": {
"laravel/framework": "~6.0||~7.0||~8.0||~9.0||~10.0||~11.0"
},
"require-dev": {
"phpunit/phpcov": ">=6.0",
"phpunit/phpunit": ">=8.0",
"laravel/framework": "~6.0||~7.0||~8.0||~9.0||~10.0||~11.0"
},
"autoload": {
"psr-4": {
"NexaMerchant\\CheckoutOneBuy\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"NexaMerchant\\CheckoutOneBuy\\Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
"NexaMerchant\\CheckoutOneBuy\\Providers\\CheckoutOneBuyServiceProvider"
],
"aliases": {}
}
},
"homepage": "https://nexamerchant.github.io/docs/",
"minimum-stability": "dev"
}
34 changes: 34 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="tests/bootstrap.php"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
<testsuites>
<testsuite name="CheckoutOneBuy Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<logging>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" />
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false" showOnlySummary="true"/>
</logging>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_DEBUG" value="true"/>
<env name="APP_URL" value="http://localhost"/>
<env name="APP_KEY" value="base64:M1igrxNfAWlVGyxxDholHqvVqvtPjAzCoJ+2/ILAVPw="/>
</php>
</phpunit>
88 changes: 88 additions & 0 deletions src/Config/CheckoutOneBuy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?php
/**
*
* This file is auto generate by Nicelizhi\Apps\Commands\Create
* @author Steve
* @date 2024-11-08 11:41:00
* @link https://github.com/xxxl4
*
*/
return [
/**
*
* The name of the package
*/
'name' => 'CheckoutOneBuy',
/**
*
* The version of the package
*/
'version' => '1.0.0',
/**
*
* The version number of the package
*/
'versionNum' => '100',

/**
*
* Enabled
*/
'enable' => env('CheckoutOneBuy.ENABLED', true),

/*
* Composer Package Name
*/
'composer' => 'nexa-merchant/checkoutonebuy',

/**
*
* The description of the package
*/
'description' => '',

/**
*
* The author of the package
*/
'author' => 'Steve',

/**
*
* The email of the author
*/
'email' => '[email protected]',

/**
*
* The homepage of the package
*/
'homepage' => 'https://github.com/xxl4',

/**
*
* The keywords of the package
*/
'keywords' => [],

/**
*
* The license of the package
*/
'license' => 'MIT',

/**
*
* The type of the package
*/
'type' => 'library',

/**
*
* The support of the package
*/
'support' => [
'email' => '[email protected]',
'issues' => 'https://github.com/xxl4'
],
];
12 changes: 12 additions & 0 deletions src/Config/acl.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
*
* This file is auto generate by Nicelizhi\Apps\Commands\Create
* @author Steve
* @date 2024-11-08 11:41:00
* @link https://github.com/xxxl4
*
*/
return [

];
47 changes: 47 additions & 0 deletions src/Config/l5-swagger.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
return [
'checkoutonebuy' => [
'api' => [
'title' => 'CheckoutOneBuy API Documentation',
],

'routes' => [
/*
* Route for accessing api documentation interface
*/
'api' => 'api/checkoutonebuy/documentation',
'docs' => storage_path('api-docs/checkoutonebuy'),
'oauth2_callback' => 'api/checkoutonebuy/oauth2-callback',
],
'paths' => [
/*
* Edit to include full URL in ui for assets
*/
'use_absolute_path' => env('L5_SWAGGER_USE_ABSOLUTE_PATH', true),

/*
* File name of the generated json documentation file
*/
'docs_json' => 'api-checkoutonebuy-docs.json',

/*
* File name of the generated YAML documentation file
*/
'docs_yaml' => 'api-checkoutonebuy-docs.yaml',

/*
* Set this to `json` or `yaml` to determine which documentation file to use in UI
*/
'format_to_use_for_docs' => env('L5_FORMAT_TO_USE_FOR_DOCS', 'json'),

/*
* Absolute paths to directory containing the swagger annotations are stored.
*/
'annotations' => [
base_path('vendor/nexa-merchant/checkoutonebuy/src/Docs/V1/CheckoutOneBuy'),

],

],
]
];
21 changes: 21 additions & 0 deletions src/Config/menu.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
*
* This file is auto generate by Nicelizhi\Apps\Commands\Create
* @author Steve
* @date 2024-11-08 11:41:00
* @link https://github.com/xxxl4
*
*/
return [
/**
* CheckoutOneBuy Dashboard.
*/
[
'key' => 'CheckoutOneBuy',
'name' => 'checkoutonebuy::app.checkoutonebuy.demo',
'route' => 'checkoutonebuy.admin.example.demo',
'sort' => 1,
'icon' => 'icon-dashboard',
]
];
Loading

0 comments on commit 54db027

Please sign in to comment.