Chrisj Posted April 15, 2019 Share Posted April 15, 2019 I’m using this video web script where videos can be purchased to view.Upon testing the purchasing process I see: “‘Something went wrong. Please try again later!!’,”Any help or guidance on what to check or look at, or if you need me to provide more code to view, to resolve this issue in order to proceed with purchase test, will be appreciated: function PT_MultipleBuyVideo() { var checked = getSelectedVideos(); if (!checked) { return false; } swal({ title: "", type: "info", html:"Simply proceed to purchase " + countSelectedVideos() + " videos(s) at a total cost of " + countTotalCredits() +" credits", showCancelButton: true, cancelButtonText: "Close", customClass: 'sweetalert-lg', confirmButtonText:'Proceed' }).then(function(){ $.ajax({ url: PT_Ajax_Requests_File() + 'aj/buy-video', type: 'POST', dataType: 'json', data: {id:checked}, }).done(function(data){ if (data.status == 200) { for (var i = 0; i < checked.length; i++) { var button = $("button[data-action='multiple_select_button'][data-id='" + checked[i] + "']") buttonMultipleSelectingStyle(button, 'purchased'); } swal({ title: "Success", type: "success", html:"", showCancelButton: true, cancelButtonText: "Close", customClass: 'sweetalert-lg', confirmButtonText:'Go To Video(s)' }).then(function(){ window.location.href='/paid-list'; }); } else { if (data.error_num == 1) { return swal( 'Error!', 'Not enough money', 'error' ); } } }).fail(function() { swal( 'Error!', 'Something went wrong. Please try again later!!', 'error' ); }) }); } function buttonMultipleBuy(command) { var button = $("button[data-action='multuple-buy-video']"); if (command == 'hide') { button.hide(); } else if (command == 'show') { button.show(); } } any help with resolving the error, to move to "Success" message, is appreciated Quote Link to comment https://forums.phpfreaks.com/topic/308597-help-with-error-something-went-wrong-please-try-again-later/ Share on other sites More sharing options...
requinix Posted April 15, 2019 Share Posted April 15, 2019 The AJAX request failed. Use your browser's developer tools to see what happened with it. Quote Link to comment https://forums.phpfreaks.com/topic/308597-help-with-error-something-went-wrong-please-try-again-later/#findComment-1566118 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.