Skip to content

Commit

Permalink
Everything is now in API section in config
Browse files Browse the repository at this point in the history
Removed unused route
  • Loading branch information
axotion committed Nov 22, 2017
1 parent e4f14b9 commit a73addf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Dodaj rezpozytorium do composer.json
**Note! This and next step are optional if you use laravel>=5.5 with package
auto discovery feature.**

Add service provider to `config/app.php` in `providers` section
```php
Liteweb\LaravelDotpay\ServiceProvider::class,
```
Expand Down Expand Up @@ -74,6 +73,7 @@ DOTPAY_PIN=
DOTPAY_BASE_URL=
DOTPAY_URL=
DOTPAY_CURL=
DOTPAY_EXPIRATION_DATETIME=
```

Expand All @@ -95,19 +95,13 @@ public function pay(Request $request)
'description' => 'Payment for internal_id order',
'control' => $transaction->id, //ID that dotpay will pong you in the answer
'language' => 'pl',
'ch_lock' => '1',
'url' => '',
'urlc' => '',
'expiration_datetime' => '2017-12-01T16:48:00',
'payer' => [
'first_name' => 'John',
'last_name' => 'Smith',
'email' => '[email protected]',
'phone' => '+48123123123'
],
'recipient' => ''

];
];

$response = $this->dotpayApi->createPayment(new Payment($data));
return $response->getPaymentUrl();
Expand All @@ -124,8 +118,6 @@ Dane do wysłania
"description" : "Payment for internal_id order",
"control" : "12345",
"language" : "pl",
"ch_lock" : "0",
"expiration_datetime" : "2017-12-01T16:48:00",
"payer" : {
"first_name" : "John",
"last_name" : "Smith",
Expand Down
5 changes: 2 additions & 3 deletions config/laravel-dotpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
'base_url' => env('DOTPAY_BASE_URL'),
'url' => env('DOTPAY_URL'),
'curl' => env('DOTPAY_CURL'),
],
'options' => [
'recipient' => [
'company' => 'YourCompany',
'address' => [
Expand All @@ -20,5 +18,6 @@
'city' => ''
]
],
]
'expiration_datetime' => env('DOTPAY_EXPIRATION_DATETIME')
],
];
1 change: 0 additions & 1 deletion src/routes.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

Route::post('dotpay/pay', 'Liteweb\LaravelDotpay\Controllers\DotpayController@pay');
Route::post('/dotpay/callback', 'Liteweb\LaravelDotpay\Controllers\DotpayController@callback');

0 comments on commit a73addf

Please sign in to comment.