Hi,
I have PayPal and Sofort as payment methods. Both are working fine.
But there is one issue regarding the Sofort payment.
When I make a purchase with PayPal I first see the "Thank you for order page" I've set up and a notice that I will be redirected soon to PayPal.
But when I pay via Sofort Payment, I don't get this Thank you page. It's redirecting me directly to Sofort Website.
I need the "Thank You" page before redirecting to Sofort.com. What can I do? Any advice?
www.strampler-shopping.de
VM 2.0 24c
Joomla 2.5.16
Thanks in advance!
Hi Chris,
you would need to recode this section of plugins\vmpayment\sofort\sofort.php ~ line 209
if ($doRedirect) {
$mainframe = JFactory::getApplication();
$mainframe->redirect($url);
}
This is immediately redirecting on the payment triggering ($url is to sofort)
Look at plugins\vmpayment\paypal\paypal.php ~ line 240
here alatak makes some html that I assume is picked up by the confirm page then JS redirects..
$html = '<html><head><title>Redirection</title></head><body><div style="margin: auto; text-align: center;">';
$html .= '<form action="' . "https://" . $url . '" method="post" name="vm_paypal_form" accept-charset="UTF-8">';
$html .= '<input type="submit" value="' . JText::_('VMPAYMENT_PAYPAL_REDIRECT_MESSAGE') . '" />';
$html .= '<input type="hidden" name="charset" value="utf-8">';
foreach ($post_variables as $name => $value) {
$html .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
}
$html .= '</form></div>';
$html .= ' <script type="text/javascript">';
$html .= ' document.vm_paypal_form.submit();';
$html .= ' </script></body></html>';
you don't need any of the form but just copy the JS redirect etc - would need a bit of experimentation..
Gruß aus Aachen