News:

Support the VirtueMart project and become a member

Main Menu

Thank you page missing for "Sofort" Payment

Started by christoscologne, December 07, 2013, 11:37:20 AM

Previous topic - Next topic

christoscologne

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!

GJC Web Design

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



GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation