Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenevdm authored and github-actions[bot] committed Oct 5, 2022
1 parent d174c71 commit 6d6feb7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Components/Subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Subscriptions extends Component
* or the receipt that was updated when a paying also came in.
*/
public function billingWasUpdated()
{
{
$this->emitTo('receipts', 'refreshComponent');

$this->displayingCreateSubscription = false;
Expand Down
22 changes: 11 additions & 11 deletions src/PayFast.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace FintechSystems\PayFast;

use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
use FintechSystems\PayFast\Contracts\BillingProvider;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Http;
use FintechSystems\PayFast\Contracts\BillingProvider;
use Illuminate\Support\Facades\Log;

class PayFast implements BillingProvider
{
Expand Down Expand Up @@ -37,7 +37,7 @@ public function __construct($client)
$this->url = 'https://www.payfast.co.za/onsite/process';
$prependUrl = config('payfast.callback_url');
}

if (config('payfast.debug') == true) {
$this->debug("In PayFast API constructor, testmode: $this->testmode, URL: $this->url");
}
Expand Down Expand Up @@ -78,7 +78,7 @@ public function createOnsitePayment($planId, $billingDate = null, $mergeFields =
$plan = config('payfast.plans')[$planId];

$recurringType = Subscription::frequencies($planId);

$data = [
'merchant_id' => $this->merchantId(),
'merchant_key' => $this->merchantKey(),
Expand Down Expand Up @@ -135,14 +135,14 @@ public function dataToString($dataArray)
* Defaults to debug and purple if logging is anything except the defaults.
* Won't log to local in the application isn't in production.
*/
function debug($message, $level = 'debug')
{
$color = match($level) {
public function debug($message, $level = 'debug')
{
$color = match ($level) {
'debug' => 'gray',
'info' => 'blue',
'notice' => 'green',
'warning' => 'orange',
'error' => 'red',
'error' => 'red',
'critical' => 'red',
'alert' => 'red',
'emergency' => 'red',
Expand All @@ -153,14 +153,14 @@ function debug($message, $level = 'debug')
if ($color == 'purple') {
$level = 'debug';
}

if ($level == 'debug' && config('payfast.debug') == false) {
return;
}

if (config('app.env') == 'production') {
Log::$level($message);
}
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/PayFastServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function register()
'passphrase' => config('payfast.passphrase'),

'testmode' => config('payfast.testmode'),

'merchant_id_test' => config('payfast.merchant_id_test'),
'merchant_key_test' => config('payfast.merchant_key_test'),
'passphrase_test' => config('payfast.passphrase_test'),
Expand Down

0 comments on commit 6d6feb7

Please sign in to comment.