' + response.data.message + '
'; + + // Response details + if (response.data.response_code) { + var statusClass = response.data.success ? 'success' : 'error'; + resultHtml += 'Response Status: ' + response.data.response_code + '
'; + } + + // Show payload sent + if (response.data.test_payload) { + resultHtml += '' + JSON.stringify(response.data.test_payload, null, 2) + ''; + resultHtml += '
' + response.data.response_body + ''; + resultHtml += '
Test failed: ' + (errorData.message || 'Unknown error') + '
'; + + if (errorData.error_code) { + errorHtml += 'Error Code: ' + errorData.error_code + '
'; + } + + if (errorData.error_data) { + errorHtml += '' + JSON.stringify(errorData.error_data, null, 2) + ''; + errorHtml += '
Test error: ' + error + '
'; + errorHtml += '+ +
++ +
+