Jump to content

addInvoicePayment kills page , kindly help


CodeQue

Recommended Posts

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);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated