Back to payments
-
It seem once you get back from mollie scripts checks if was payment made or not and if so do appropriate action or do nothing.
That means if you return back to page without making payment like made a mistake and have chosen wrong payment method you will get empty page.
Have modified code to fix this bug.
changed file classes/Form.php.search for:
if (isset($_GET['payment']))
replace condition with:if (isset($_GET['payment'])) { $processRedirect = $this->processRedirect($post->ID, $_GET['payment']); if($processRedirect) return $processRedirect; }
search for
if ($payment == null || $registration == null)
replace condition with:if ($payment == null || $registration == null){ echo '<p class="' . esc_attr($errorClass) . '">' . esc_html__('No payment found', 'mollie-forms') . '</p>'; return false; } elseif ($registration->post_id == $postId) { if ($payment->payment_status == 'paid' || $payment->payment_status == 'authorized') { if ($afterPayment == 'redirect') return wp_redirect($successRedirect); else echo '<p class="' . esc_attr($successClass) . '">' . esc_html($successMessage) . '</p>'; return false; } elseif($payment->payment_status != 'open') { if ($afterPayment == 'redirect') return wp_redirect($errorRedirect); else echo '<p class="' . esc_attr($errorClass) . '">' . esc_html($errorMessage) . '</p>'; return false; } else { return false; } } else { return false; }
- The topic ‘Back to payments’ is closed to new replies.