File tree Expand file tree Collapse file tree 3 files changed +39
-2
lines changed
Expand file tree Collapse file tree 3 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -28,4 +28,7 @@ install:
2828 - if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi
2929 - if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi
3030
31- script : vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text
31+ script :
32+ - composer validate --strict
33+ - vendor/bin/phpcs --standard=PSR2 src
34+ - vendor/bin/phpunit --coverage-text
Original file line number Diff line number Diff line change @@ -27,6 +27,40 @@ The following gateways are provided by this package:
2727For general usage instructions, please see the main [ Omnipay] ( https://github.com/thephpleague/omnipay )
2828repository.
2929
30+ ### Basic purchase example
31+
32+ ``` php
33+ $gateway = \Omnipay\Omnipay::create('Mollie');
34+ $gateway->setApiKey('test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM');
35+
36+ $response = $gateway->purchase(
37+ [
38+ "amount" => "10.00",
39+ "currency" => "EUR",
40+ "description" => "My first Payment",
41+ "returnUrl" => "https://webshop.example.org/mollie-return.php"
42+ ]
43+ )->send();
44+
45+ // Process response
46+ if ($response->isSuccessful()) {
47+
48+ // Payment was successful
49+ print_r($response);
50+
51+ } elseif ($response->isRedirect()) {
52+
53+ // Redirect to offsite payment gateway
54+ $response->redirect();
55+
56+ } else {
57+
58+ // Payment failed
59+ echo $response->getMessage();
60+ }
61+ ```
62+
63+
3064## Support
3165
3266If you are having general issues with Omnipay, we suggest posting on
Original file line number Diff line number Diff line change 3333 "psr-4" : { "Omnipay\\ Mollie\\ Test\\ " : " tests/" }
3434 },
3535 "require" : {
36- "omnipay/common" : " 3.0.2 "
36+ "omnipay/common" : " ^ 3.0.1 "
3737 },
3838 "require-dev" : {
3939 "omnipay/tests" : " ^3.1" ,
You can’t perform that action at this time.
0 commit comments