Subscription Module Update

Payment codes changes and fix paypal payment failed
This commit is contained in:
Leonard Biano
2024-08-29 23:48:19 +08:00
parent 3116110c44
commit 9dc58d6fc6
13 changed files with 143 additions and 61 deletions
@@ -32,11 +32,11 @@ class PaymentCodeController extends Controller
$paymentCodes = $this->paymentCodeRepository->all();
$subscription_plans = SubscriptionPlanPrice::with('plan')->where('payment','upfront')->where('payment_method','prepaid')->whereHas('plan', function ($query) {
$query->where('status', 1);
$query->where('prepaid', 1)->where('status', 1);
})->get()->map(function($price, $key) {
return [
'id' => $price->id,
'label' => $price->plan->title.' - '.$price->access_expire_duration.' Months'
'label' => $price->plan->title.' - '.$price->total_credits.' Credits for '.$price->access_expire_duration.' '.$price->access_expire_duration_type.' ($'.number_format($price->price,2).')'
];
});
return response()->json([