File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -638,13 +638,13 @@ public static function handlePaymentPaid(OrderItem $item)
638
638
$ subscription = $ item ->orderable ;
639
639
640
640
if ($ subscription ->ends_at !== null ) {
641
- DB ::transaction (function () use ($ item ) {
642
- if (! $ this ->scheduled_order_item_id ) {
643
- $ item = $ this ->scheduleNewOrderItemAt ($ this ->ends_at );
641
+ DB ::transaction (function () use ($ item, $ subscription ) {
642
+ if (! $ subscription ->scheduled_order_item_id ) {
643
+ $ item = $ subscription ->scheduleNewOrderItemAt ($ subscription ->ends_at );
644
644
}
645
645
646
- $ this ->fill ([
647
- 'cycle_ends_at ' => $ this ->plan ()->interval ()->getEndOfNextSubscriptionCycle ($ this ),
646
+ $ subscription ->fill ([
647
+ 'cycle_ends_at ' => $ subscription ->plan ()->interval ()->getEndOfNextSubscriptionCycle ($ subscription ),
648
648
'ends_at ' => null ,
649
649
'scheduled_order_item_id ' => $ item ->id ,
650
650
])->save ();
You can’t perform that action at this time.
0 commit comments