@@ -22,13 +22,13 @@ |
||
22 | 22 | if ($this->app->runningInConsole()) { |
23 | 23 | //publish the config files |
24 | 24 | $this->publishes([ |
25 | - __DIR__.'/../config/chpter.php' => config_path('chpter.php'), |
|
26 | - ], 'chpter-config'); |
|
25 | + __DIR__.'/../config/chpter.php' => config_path('chpter.php'), |
|
26 | + ], 'chpter-config'); |
|
27 | 27 | |
28 | 28 | // Register commands |
29 | 29 | $this->commands([ |
30 | 30 | InstallChpter::class, |
31 | - ]); |
|
31 | + ]); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | public function register() |
41 | 41 | { |
42 | 42 | |
43 | - $this->app->singleton(Chpter::class, function () { |
|
43 | + $this->app->singleton(Chpter::class, function() { |
|
44 | 44 | return new Chpter(); |
45 | 45 | }); |
46 | 46 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -Route::get('demo', function () { |
|
4 | +Route::get('demo', function() { |
|
5 | 5 | return "This is amazing right (:"; |
6 | 6 | }); |
@@ -16,8 +16,8 @@ |
||
16 | 16 | $this->info('Publishing Configuration...'); |
17 | 17 | |
18 | 18 | $this->call('vendor:publish', [ |
19 | - '--provider' => "KiplingKelvin\ChpterLaravelSdk\ChpterServiceProvider", |
|
20 | - '--tag' => "chpter-config" |
|
19 | + '--provider' => "KiplingKelvin\ChpterLaravelSdk\ChpterServiceProvider", |
|
20 | + '--tag' => "chpter-config" |
|
21 | 21 | ]); |
22 | 22 | |
23 | 23 | $this->info('Installed Chpter for Laravel'); |
@@ -9,9 +9,9 @@ |
||
9 | 9 | return KiplingKelvin\ChpterLaravelSdk\Chpter::mpesaPayment($customer, $products, $amount, $callback_details); |
10 | 10 | } |
11 | 11 | |
12 | -function chpter_card_payment($customer, $products, $amount,$card_details, $callback_details) |
|
12 | +function chpter_card_payment($customer, $products, $amount, $card_details, $callback_details) |
|
13 | 13 | { |
14 | - return KiplingKelvin\ChpterLaravelSdk\Chpter::cardPayment($customer, $products, $amount,$card_details, $callback_details); |
|
14 | + return KiplingKelvin\ChpterLaravelSdk\Chpter::cardPayment($customer, $products, $amount, $card_details, $callback_details); |
|
15 | 15 | } |
16 | 16 | function chpter_hosted_redirect_payment($customer, $amount, $redirect_urls) |
17 | 17 | { |
@@ -30,15 +30,15 @@ |
||
30 | 30 | public function __construct() |
31 | 31 | { |
32 | 32 | //Base URL for the API endpoints. This is basically the 'common' part of the API endpoints |
33 | - $this->chpter_payment_url = config('chpter.payment_url'); |
|
34 | - $this->chpter_hosted_redirect_payment_url = config('chpter.hosted_redirect_payment_url'); |
|
35 | - $this->chpter_express_redirect_payment_url = config('chpter.express_redirect_payment_url'); |
|
33 | + $this->chpter_payment_url = config('chpter.payment_url'); |
|
34 | + $this->chpter_hosted_redirect_payment_url = config('chpter.hosted_redirect_payment_url'); |
|
35 | + $this->chpter_express_redirect_payment_url = config('chpter.express_redirect_payment_url'); |
|
36 | 36 | |
37 | - $this->chpter_accounts_token_renewal_url = config('chpter.accounts_token_renewal_url'); |
|
37 | + $this->chpter_accounts_token_renewal_url = config('chpter.accounts_token_renewal_url'); |
|
38 | 38 | |
39 | 39 | |
40 | - $this->token = config('chpter.chpter_token'); |
|
41 | - $this->domain =config('chpter.domain'); |
|
40 | + $this->token = config('chpter.chpter_token'); |
|
41 | + $this->domain =config('chpter.domain'); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 |
@@ -38,14 +38,14 @@ discard block |
||
38 | 38 | |
39 | 39 | |
40 | 40 | $this->token = config('chpter.chpter_token'); |
41 | - $this->domain =config('chpter.domain'); |
|
41 | + $this->domain = config('chpter.domain'); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | |
45 | 45 | public function mpesaPayment($customer, $products, $amount, $callback_details) |
46 | 46 | { |
47 | 47 | |
48 | - $client = new Client(); |
|
48 | + $client = new Client(); |
|
49 | 49 | |
50 | 50 | $requestBody = array( |
51 | 51 | "customer_details"=> $customer, |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | public function hostedRedirectPayment($customer, $amount, $redirect_urls) |
74 | 74 | { |
75 | 75 | |
76 | - $client = new Client(); |
|
76 | + $client = new Client(); |
|
77 | 77 | |
78 | 78 | $requestBody = array( |
79 | 79 | "customer_details"=> $customer, |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | public function expressRedirectPayment($transaction_data, $redirect_urls) |
100 | 100 | { |
101 | 101 | |
102 | - $client = new Client(); |
|
102 | + $client = new Client(); |
|
103 | 103 | |
104 | 104 | $requestBody = array( |
105 | 105 | "transaction_data"=> $transaction_data, |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | public function accountsTokenRenewal() |
125 | 125 | { |
126 | 126 | |
127 | - $client = new Client(); |
|
127 | + $client = new Client(); |
|
128 | 128 | |
129 | 129 | try { |
130 | 130 | $response = $client->post($this->chpter_accounts_token_renewal_url, [ |