Skip to content

Commit

Permalink
More tests on validating objects
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Jan 19, 2024
1 parent f2ac5a8 commit 210e83d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion upload/catalog/model/extension/payment/worldpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public function recurringPayment(array $item, string $order_id_rand, string $tok
$subscription_end = new \DateTime('0000-00-00');
}

if (property_exists($response_data, 'paymentStatus') && $response_data->paymentStatus == 'SUCCESS') {
if (array_key_exists('paymentStatus', get_object_vars($response_data)) && $response_data->paymentStatus == 'SUCCESS') {
$this->addRecurringOrder($order_info, $response_data->orderCode, $token, $price, $subscription_id, date_format($trial_end, 'Y-m-d H:i:s'), date_format($subscription_end, 'Y-m-d H:i:s'));
$this->updateRecurringOrder($subscription_id, date_format($next_payment, 'Y-m-d H:i:s'));
$this->addProfileTransaction($subscription_id, $response_data->orderCode, $price, 1);
Expand Down

0 comments on commit 210e83d

Please sign in to comment.