CodeQue Posted February 18, 2019 Share Posted February 18, 2019 Im new to WHMCS, i developed a merchant payment gateway. The invoice is approved but on the function addInvoicePayment, the page just dies and nothing below is processed. But if i die the page and display details before the function on my website and then removes the die statement, it works fine and redirect on successful payment. This is really frustrating. Here is a sample of my code below, is there anything i am doing wrong? logTransaction($gatewayParams['name'], $gateway_response, $transactionStatus); $paymentSuccess = false; if ($success) { /** * Add Invoice Payment. * * Applies a payment transaction entry to the given invoice ID. * * @param int $invoiceId Invoice ID * @param string $transactionId Transaction ID * @param float $paymentAmount Amount paid (defaults to full balance) * @param float $paymentFee Payment fee (optional) * @param string $gatewayModule Gateway module name */ $invoiceId = (int)$invoiceId; $paymentAmount = (float)$paymentAmount; $paymentFee = (float)$paymentFee; addInvoicePayment( $invoiceId, $transactionId, $paymentAmount, $paymentFee, $gatewayModuleName ); $paymentSuccess = true; } /** * Redirect to invoice. * * Performs redirect back to the invoice upon completion of the 3D Secure * process displaying the transaction result along with the invoice. * * @param int $invoiceId Invoice ID * @param bool $paymentSuccess Payment status */ callback3DSecureRedirect($invoiceId, $paymentSuccess); 0 Quote Link to comment 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.