| @@ -8,9 +8,8 @@ | ||
| 8 | 8 | use FluentCart\App\Helpers\StatusHelper; |
| 9 | 9 | use FluentCart\App\Models\Cart; |
| 10 | 10 | use FluentCart\App\Modules\Subscriptions\Services\SubscriptionService; |
| 11 | 11 | use FluentCart\App\Services\DateTime\DateTime; |
| 12 | -use FluentCart\App\Services\Payments\PaymentHelper; | |
| 13 | 12 | use FluentCart\App\Models\Subscription; |
| 14 | 13 | |
| 15 | 14 | class CodHandler { |
| 16 | 15 | |
| @@ -60,10 +59,8 @@ | ||
| 60 | 59 | do_action('fluent_cart/order_placed_offline', $data); |
| 61 | 60 | } |
| 62 | 61 | } |
| 63 | 62 | |
| 64 | - $paymentHelper = new PaymentHelper('offline_payment'); | |
| 65 | - | |
| 66 | 63 | $relatedCart = Cart::query()->where('order_id', $order->id) |
| 67 | 64 | ->where('stage', '!=', 'completed') |
| 68 | 65 | ->first(); |
| 69 | 66 | |
| @@ -72,9 +69,9 @@ | ||
| 72 | 69 | $relatedCart->completed_at = DateTime::now()->format('Y-m-d H:i:s'); |
| 73 | 70 | $relatedCart->save(); |
| 74 | 71 | } |
| 75 | 72 | |
| 76 | - return $paymentHelper->successUrl($paymentInstance->transaction->uuid); | |
| 73 | + return $paymentInstance->transaction->getSuccessUrl(); | |
| 77 | 74 | } |
| 78 | 75 | |
| 79 | 76 | public function handleZeroTotalPayment($paymentInstance) |
| 80 | 77 | { |
| @@ -104,8 +101,7 @@ | ||
| 104 | 101 | } |
| 105 | 102 | } |
| 106 | 103 | } |
| 107 | 104 | |
| 108 | - $paymentHelper = new PaymentHelper('offline_payment'); | |
| 109 | - return $paymentHelper->successUrl($transaction->uuid); | |
| 105 | + return $transaction->getSuccessUrl(); | |
| 110 | 106 | } |
| 111 | 107 | } |