Duplicate key 4021 in FedEx transaction

If the 'Duplicate key 4021 in FedEx transaction' error is displayed when you try to get your FedEx meter number:

Check whether the address you set up in the Fedex tab on the Shipping settings page (the link to this page is in the ADMINISTRATION side box) in your administrator panel is the same as the address set up on your FedEx account.

  1. If the addresses are different enter the same address, which is set up on your FedEx account, in the Fedex tab and try to get your FedEx meter number.
    NOTE: If your address is in the USA, the value of the Country field must be US, not USA.
  2. If the addresses are similar and the Duplicate key 4021 in FedEx transaction error is displayed do the following:
    1. Open the fedexdc.php file located in the shippings/fedex directory of your CS-Cart installation.
    2. Find the following part of code:
      // Duplicate Key Something is wrong
                      if (isset($this->rHash[$keyVal])) {
                          $this->setError("Duplicate key $keyVal in FedEx transaction");
                          return;
                      }

      and replace it with this one:
      // Duplicate Key Something is wrong
                      /*if (isset($this->rHash[$keyVal])) {
                          $this->setError("Duplicate key $keyVal in FedEx transaction");
                          return;
                      }*/
    3. Save the file.
    4. Try to get your FedEx meter number.

Noticed an error in the article or it is not clear enough? Any suggestions to improve it? Please let us know by filling in the feedback form. Click here.