From 0285b79685040d5a56177dc0fe513a85f753488c Mon Sep 17 00:00:00 2001 From: Chris Konnertz Date: Sun, 5 Jul 2015 14:59:54 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 2257fee..0824573 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,15 @@ class PaypalPaymentController extends BaseController { } ``` +If you want to use the Laravel config file: The first step is to publish the config with `artisan vendor:publish`. This will create the config file in `storage/paypal_payment.php` (`app/config/paypal_payment.php` in Laravel 4). Configurate it, then replace the `setConfig()` method call (see above) with: + +``` +$config = config('paypal_payment'); // Get all config items as multi dimensional array +$flatConfig = array_dot($config); // Flatten the array with dots + +$apiContext->setConfig($flatConfig); +``` + ##2-Create Payment Add the `create()` function to the `PaypalPaymentController` Controller From cb1ddae32fed9d0ab86f23d0dc30fefbfa4a3247 Mon Sep 17 00:00:00 2001 From: Chris Konnertz Date: Sun, 5 Jul 2015 15:01:12 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0824573..c3941f3 100644 --- a/README.md +++ b/README.md @@ -197,13 +197,13 @@ class PaypalPaymentController extends BaseController { } ``` -If you want to use the Laravel config file: The first step is to publish the config with `artisan vendor:publish`. This will create the config file in `storage/paypal_payment.php` (`app/config/paypal_payment.php` in Laravel 4). Configurate it, then replace the `setConfig()` method call (see above) with: +If you want to use the Laravel config file: The first step is to publish the config with `artisan vendor:publish`. This will create the config file `storage/paypal_payment.php` (`app/config/paypal_payment.php` in Laravel 4). Configurate it, then replace the `setConfig()` method call (see above) with: ``` $config = config('paypal_payment'); // Get all config items as multi dimensional array $flatConfig = array_dot($config); // Flatten the array with dots -$apiContext->setConfig($flatConfig); +$this->_apiContext->setConfig($flatConfig); ``` ##2-Create Payment