Skip to content

Commit

Permalink
Added Datetime and clone in calculateSchedule of extension/payment/pa…
Browse files Browse the repository at this point in the history
…ypal
  • Loading branch information
TheCartpenter committed May 25, 2024
1 parent 69027a4 commit 73d42b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion upload/catalog/model/extension/payment/paypal.php
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,9 @@ public function createPayment($order_data, $paypal_order_data, $price, $order_re
return false;
}

public function calculateSchedule($frequency, $next_payment, $cycle) {
private function calculateSchedule($frequency, \DateTime $next_payment, $cycle) {
$next_payment = clone $next_payment;

if ($frequency == 'semi_month') {
$day = date_format($next_payment, 'd');
$value = 15 - $day;
Expand Down

0 comments on commit 73d42b5

Please sign in to comment.