← All changes
|
app/Modules/PaymentMethods/PayPalGateway/SubscriptionManager.php
+2
-3
1.5.4
→
1.6.6
View file →
| @@ -185,10 +185,8 @@ | ||
| 185 | 185 | if (!empty($nextBillingDate)) { |
| 186 | 186 | $nextBillingDate = gmdate('Y-m-d H:i:s', strtotime($nextBillingDate)); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - $config = $subscription->config ?: []; | |
| 190 | - | |
| 191 | 189 | // update subscription in table |
| 192 | 190 | $data = array_filter([ |
| 193 | 191 | 'vendor_subscription_id' => $vendorSubscriptionId, |
| 194 | 192 | 'vendor_plan_id' => $vendorPlanId, |
| @@ -195,12 +193,13 @@ | ||
| 195 | 193 | 'current_payment_method' => 'paypal', |
| 196 | 194 | 'vendor_customer_id' => $vendorCustomerId, |
| 197 | 195 | 'next_billing_date' => $nextBillingDate, |
| 198 | 196 | 'status' => $this->getCorrectSubscriptionStatus(Arr::get($paypalSubscription, 'status')), |
| 199 | - 'config' => array_merge($config, ['is_trial_days_simulated' => 'yes']) | |
| 200 | 197 | ]); |
| 201 | 198 | |
| 202 | 199 | Subscription::query()->where('id', $subscriptionId)->update($data); |
| 200 | + | |
| 201 | + $subscription->mergeConfig(['is_trial_days_simulated' => 'yes']); | |
| 203 | 202 | |
| 204 | 203 | $billingInfo = PaymentHelper::parsePaymentMethodDetails('paypal', [ |
| 205 | 204 | 'email' => Arr::get($paypalSubscription, 'subscriber.email_address'), |
| 206 | 205 | 'payer_id' => Arr::get($paypalSubscription, 'subscriber.payer_id'), |