-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
112 changed files
with
941 additions
and
1,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ build: | |
- php-scrutinizer-run | ||
environment: | ||
php: | ||
version: 8.1.13 | ||
version: '7.3.21' | ||
tests: | ||
override: | ||
- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM srmklive/docker-php-cli:7.4 | ||
FROM srmklive/docker-php-cli:7.1 | ||
|
||
LABEL maintainer="Raza Mehdi<[email protected]>" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,6 +108,44 @@ By default, the currency used is `USD`. If you wish to change it, you may call ` | |
$provider->setCurrency('EUR'); | ||
``` | ||
|
||
## Create Recurring Daily Subscription | ||
|
||
```php | ||
$response = $provider->addProduct('Demo Product', 'Demo Product', 'SERVICE', 'SOFTWARE') | ||
->addSubscriptionTrialPricing('DAY', 7) | ||
->addDailyPlan('Demo Plan', 'Demo Plan', 1.50) | ||
->setupSubscription('John Doe', '[email protected]', '2021-12-10') ; | ||
``` | ||
|
||
## Create Recurring Weekly Subscription | ||
|
||
```php | ||
$response = $provider->addProduct('Demo Product', 'Demo Product', 'SERVICE', 'SOFTWARE') | ||
->addSubscriptionTrialPricing('DAY', 7) | ||
->addWeeklyPlan('Demo Plan', 'Demo Plan', 30) | ||
->setupSubscription('John Doe', '[email protected]', '2021-12-10') ; | ||
``` | ||
|
||
## Create Recurring Monthly Subscription | ||
|
||
```php | ||
$response = $provider->addProduct('Demo Product', 'Demo Product', 'SERVICE', 'SOFTWARE') | ||
->addSubscriptionTrialPricing('DAY', 7) | ||
->addMonthlyPlan('Demo Plan', 'Demo Plan', 100) | ||
->setupSubscription('John Doe', '[email protected]', '2021-12-10') ; | ||
``` | ||
|
||
## Create Recurring Annual Subscription | ||
|
||
```php | ||
$response = $provider->addProduct('Demo Product', 'Demo Product', 'SERVICE', 'SOFTWARE') | ||
->addSubscriptionTrialPricing('DAY', 7) | ||
->addAnnualPlan('Demo Plan', 'Demo Plan', 600) | ||
->setupSubscription('John Doe', '[email protected]', '2021-12-10') ; | ||
``` | ||
|
||
## Create Subscription by Existing Product & Billing Plan | ||
|
||
<a name="usage-helpers"></a> | ||
## Helper Methods | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,53 @@ | ||
{ | ||
"name": "srmklive/paypal", | ||
"type": "library", | ||
"description": "Laravel plugin For Processing Payments Through Paypal Express Checkout. Can Be Used Independently With Other Applications.", | ||
"keywords": [ | ||
"http", | ||
"rest", | ||
"web service", | ||
"paypal", | ||
"laravel paypal" | ||
], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Raza Mehdi", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Srmklive\\PayPal\\": "src/" | ||
} | ||
"name": "srmklive/paypal", | ||
"type": "library", | ||
"description": "Laravel plugin For Processing Payments Through Paypal Express Checkout. Can Be Used Independently With Other Applications.", | ||
"keywords": ["http", "rest", "web service", "paypal", "laravel paypal"], | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Raza Mehdi", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Srmklive\\PayPal\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Srmklive\\PayPal\\Tests\\": "tests/" | ||
} | ||
}, | ||
"require": { | ||
"php": "^7.0", | ||
"guzzlehttp/guzzle": "~6.0|~7.0", | ||
"illuminate/support": "~5.1|~5.2|~5.3|~5.4|~5.5|~5.6|~5.7|~5.8", | ||
"nesbot/carbon": "~1.0|~2.0" | ||
}, | ||
"require-dev": { | ||
"phpstan/phpstan": "~0.1|~1.0", | ||
"phpunit/phpunit": "^5.7|^6.0|^7.0|^8.0", | ||
"symfony/var-dumper": "~3.0|~4.0|~5.0" | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"kylekatarnls/update-helper": true | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Srmklive\\PayPal\\Tests\\": "tests/" | ||
} | ||
}, | ||
"require": { | ||
"php": ">=7.2|^8.0", | ||
"ext-curl": "*", | ||
"guzzlehttp/guzzle": "~7.0", | ||
"illuminate/support": "~6.0|~7.0|~8.0|~9.0|^10.0|^11.0", | ||
"nesbot/carbon": "~2.0|^3.0" | ||
}, | ||
"require-dev": { | ||
"phpstan/phpstan": "^1.10", | ||
"phpunit/phpunit": "^8.0|^9.0|^10.0|^11.0", | ||
"symfony/var-dumper": "~5.0|^6.0|^7.0" | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"allow-plugins": { | ||
"pestphp/pest-plugin": true | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Srmklive\\PayPal\\Providers\\PayPalServiceProvider" | ||
], | ||
"aliases": { | ||
"PayPal": "Srmklive\\PayPal\\Facades\\PayPal" | ||
} | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
"sort-packages": true, | ||
"optimize-autoloader": true | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Srmklive\\PayPal\\Providers\\PayPalServiceProvider" | ||
], | ||
"aliases": { | ||
"PayPal": "Srmklive\\PayPal\\Facades\\PayPal" | ||
} | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false"> | ||
<coverage> | ||
<report> | ||
<clover outputFile="build/logs/clover.xml"/> | ||
<html outputDirectory="build/coverage"/> | ||
<text outputFile="build/coverage.txt"/> | ||
</report> | ||
</coverage> | ||
<phpunit bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false"> | ||
<testsuites> | ||
<testsuite name="PayPal Test Suite"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src/</directory> | ||
<exclude> | ||
<file>src/PayPalFacadeAccessor.php</file> | ||
<file>src/Traits/PayPalVerifyIPN.php</file> | ||
<file>src/Services/Str.php</file> | ||
<directory suffix=".php">src/Facades/</directory> | ||
<directory suffix=".php">src/Providers/</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<junit outputFile="build/report.junit.xml"/> | ||
<log type="junit" target="build/report.junit.xml"/> | ||
<log type="coverage-html" target="build/coverage"/> | ||
<log type="coverage-text" target="build/coverage.txt"/> | ||
<log type="coverage-clover" target="build/logs/clover.xml"/> | ||
</logging> | ||
<source> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
<exclude> | ||
<file>src/PayPalFacadeAccessor.php</file> | ||
<file>src/Traits/PayPalVerifyIPN.php</file> | ||
<file>src/Services/Str.php</file> | ||
<directory suffix=".php">src/Facades/</directory> | ||
<directory suffix=".php">src/Providers/</directory> | ||
</exclude> | ||
</source> | ||
</phpunit> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.