It will pop up alerts with the error codes, however if the information is correct, or no error is found, nothing happens, other than the paypal account showing "Payment Received". Here is the code in question, in view/theme/default/template/paypal_direct.tpl
Code: Select all
<script type="text/javascript"><!--
function confirmSubmit() {
$.ajax({
type: 'POST',
url: 'index.php?route=payment/paypal_direct/send',
data: $('#paypal :input'),
dataType: 'json',
success: function(data) {
if (data.error) {
alert(data.error);
}
if (data.success) {
alert("success2");
location = 'index.php?route=checkout/success';
}
}
});
}
//--></script>
To try and fix this I changed the code to the following:
Code: Select all
.........
if (data.error) {
alert(data.error);
}else {
alert("success2");
location = 'index.php?route=checkout/success';
}
..........