3

We are using the CardConnect Payment Gateway for our site. Before a few days ago we face a credit card charged two times for some orders and Magento Shows only 1 order and 1 Invoice and 1 transaction. So we have asked CardConnect Support team and they replied like below:

software sending the requests to our gateway multiple times. Please check below the snapshot for the same.

enter image description here

enter image description here

We have checked the logs and found that there is a double authcode for those orders.

In the CardConnect Configuration, we have set "Action": Authorize & Capture. We have also placed test orders but we can not reproduce the issue. Can anybody suggest me how to solve this kind of issue? Below is the Model File snapshot for the Payment for the reference.

For Authorize Function :

$data = [
            'merchid' => $merchantId,
            'accttype' => $payment->getCcType(),
            'account' => $additionalInfo['cc_number_enc'],
            'expiry' => str_pad($expiryMonth, 2, "0", STR_PAD_LEFT) . substr($expiryYear, -2),
            'cvv2' => $payment->getCcCid(),
            //'amount' => $amount * 100,
            'amount' => $grandTotal * 100,
            'currency' => $order->getBaseCurrencyCode(),
            'orderid' => $order->getId(),
            'name' => $billing->getName(),
            'address' => $billing->getStreetLine(1),
            'city' => $billing->getCity(),
            'region' => $billing->getRegion(),
            'country' => $billing->getCountryId(),
            'postal' => $billing->getPostcode(),
            'email' => $billing->getEmail(),
            'phone' => $billing->getTelephone()
        ];

        if ($capture) {
            $data['capture'] = 'Y';
        }

For Capture Function:

// If we have previously captured an amount, we need a new auth token, otherwise use the one we had.
        $order_total_due = $order->getBaseTotalDue();
        if ($order_total_due != $order_total) {
            $billing = $order->getBillingAddress();
            $authorize_data = [
              'merchid' => $merchantId,
              'account' => $additionalInfo['token'],
              'expiry' => $additionalInfo['cc_expiry'],
              'amount' => $amounttax * 100,
              'currency' => $order->getBaseCurrencyCode(),
              'orderid' => $order->getId(),
              'name' => $billing->getName(),
              'address' => $billing->getStreetLine(1),
              'city' => $billing->getCity(),
              'region' => $billing->getRegion(),
              'country' => $billing->getCountryId(),
              'postal' => $billing->getPostcode(),
              'email' => $billing->getEmail(),
              'phone' => $billing->getTelephone(),
            ];

Order status for double-charged is under "Processing" state and Invoice state is paid. Regular order status is under the "Payment Review" state and the Invoice state is " pending".

While checking Order under the Sales > Orders we can see a comment like below for the Regular orders:

An amount of $3.28 will be captured after being approved at the payment gateway.

For Double Charged like below:

Captured amount of $3.69 online. Transaction ID: "070459346166"

Can anybody take a look into this to solve this issue? Any kind of help will be appreciated.

Thanks in advance.

1
  • did you found any solution? – Nayem323 Nov 25 '20 at 4:33
0

It's probably an issue with the server. I have this exact issue, but when I changed my cron jobs to once daily, versus every 5 minutes, the problem went away. You may want to look into optimizing your site/server, or moving to a new host.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.