Hello,
Please how do I skip the "thank you for your order" page that shows before the payment page? I see that some websites that use vm don't have it, but I've been unable to find a solution for this problem. Help would be deeply appreciated.
This is normally controlled by each individual payment plugin by the plgVmConfirmedOrder() function called by cart.php
For example the native paypal plug uses
$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>';
$html .= ' <script type="text/javascript">';
$html .= ' document.vm_paypal_form.submit();';
$html .= ' </script></body></html>';
so it all depends what payment plugin your using
Ok, many thanks. I had a payment plugin built for my site, will let developer know.
Hello,
Another problem I'm facing is multiple creations of the same cart in a session. In my case, when a client gets returned from the payment gateway due to whatever payment failure and want to purchase using a payment method, they get returned to the cart with the items still in them (which is great). The problem is every time they try to pay again, a different invoice is created and so I have a lot of pending invoices on my back end.
Can't the same invoice # be called on to get this done instead of a new one getting created all the time?
this I would think is down to your custom payment plugin - there are lots of functions within the plugin that need to be called correctly..
Test against something like the Paypal plugin to see the correct operation