From 455d1d83faeb608ee3016b3a75de247664727da5 Mon Sep 17 00:00:00 2001 From: edmondlang Date: Wed, 10 May 2023 13:38:11 +0800 Subject: [PATCH] fix sending billplz email to customer on development environment --- app/Classes/Modules/Billplzs/Services/CreatesBillplzBill.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Classes/Modules/Billplzs/Services/CreatesBillplzBill.php b/app/Classes/Modules/Billplzs/Services/CreatesBillplzBill.php index 1bed083c..a2947e82 100644 --- a/app/Classes/Modules/Billplzs/Services/CreatesBillplzBill.php +++ b/app/Classes/Modules/Billplzs/Services/CreatesBillplzBill.php @@ -4,6 +4,7 @@ namespace App\Classes\Modules\Billplzs\Services; use Illuminate\Support\Facades\Http; use App\Classes\Exceptions\MalformedRequestException; +use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Log; class CreatesBillplzBill @@ -26,7 +27,7 @@ class CreatesBillplzBill $response = Http::withBasicAuth(config('billplz.api_key').':', '')->post(config('billplz.base_url').'/api/v3/bills', [ 'collection_id' => $wallet ? config('billplz.wallet_collection_id') : config('billplz.collection_id'), 'name' => $name, - 'email' => $email, + 'email' => App::environment('production') ? $email : 'development@cief-malaysia.com', 'description' => $description, 'amount' => $this->finalizeAmount($amount), 'redirect_url' => route('online_payment.redirect'),