Skip to content

Commit 307a3eb

Browse files
fix(paystack): House keeping
1 parent ea47b0f commit 307a3eb

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

resources/config/paystack.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Paystack Payment URL
1919
*
2020
*/
21-
'paymentURL' => getenv('PAYSTACK_PAYMENT_URL'),
21+
'paymentUrl' => getenv('PAYSTACK_PAYMENT_URL'),
2222

2323
/**
2424
* Optional email address of the merchant

src/Paystack.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class Paystack {
1616
*/
1717
const ITF = "Invalid transaction reference";
1818

19-
2019
/**
2120
* Issue Secret Key from your Paystack Dashboard
2221
* @var mixed
@@ -40,7 +39,7 @@ class Paystack {
4039
* Paystack API base Url
4140
* @var string
4241
*/
43-
protected $baseUrl = 'https://api.paystack.co';
42+
protected $baseUrl;
4443

4544
/**
4645
* Authorization Url - Paystack payment page
@@ -51,11 +50,20 @@ class Paystack {
5150
public function __construct()
5251
{
5352
$this->setKey();
53+
$this->setBaseUrl();
5454
$this->setRequestOptions();
5555
}
5656

5757
/**
58-
* Get secret key from paystack config file
58+
* Get Base Url from Paystack config file
59+
*/
60+
public function setBaseUrl()
61+
{
62+
$this->baseUrl = config('paystack.paymentUrl');
63+
}
64+
65+
/**
66+
* Get secret key from Paystack config file
5967
* @return void
6068
*/
6169
public function setKey()

0 commit comments

Comments
 (0)