#StackBounty: #magento-1.9 #orders #payment #authorize.net Magento and Authorize Suspected Fraud Credit Memo

Bounty: 100

When using authorize.net as payment gateway, why does it set transaction_id to null on the invoice generated when authorize.net returns a suspected fraud code. Later when the transaction is approved on authroize.net and I run get payment update to so that it changes the magento order state to processing allowing me to ship the product which is all fine.

Then later if I need to perform a credit memo on this transaction I can’t. After tracing all the conditionals in magento I realized it was because “transaction_id” is set to null on all authorize.net suspected fraud transactions. This needs to be set to 1 in order for the refund option to be given.

Are there any explanations on why the behavior is like this and if there are any solutions to this?


Get this bounty!!!

#StackBounty: #magento-1.9 #orders #authorize.net Magento and Authorize Suspected Fraud Credit Memo

Bounty: 100

When using authorize.net as payment gateway, why does it set transaction_id to null on the invoice generated when authorize.net returns a suspected fraud code. Later when the transaction is approved on authroize.net and I run get payment update to so that it changes the magento order state to processing allowing me to ship the product which is all fine.

Then later if I need to perform a credit memo on this transaction I can’t. After tracing all the conditionals in magento I realized it was because “transaction_id” is set to null on all authorize.net suspected fraud transactions. This needs to be set to 1 in order for the refund option to be given.

Are there any explanations on why the behavior is like this and if there are any solutions to this?


Get this bounty!!!

#StackBounty: #magento-1.9 Magento and Authorize Suspected Fraud Credit Memo

Bounty: 100

When using authorize.net as payment gateway, why does it set transaction_id to null on the invoice generated when authorize.net returns a suspected fraud code. Later when the transaction is approved on authroize.net and I run get payment update to so that it changes the magento order state to processing allowing me to ship the product which is all fine.

Then later if I need to perform a credit memo on this transaction I can’t. After tracing all the conditionals in magento I realized it was because “transaction_id” is set to null on all authorize.net suspected fraud transactions. This needs to be set to 1 in order for the refund option to be given.

Are there any explanations on why the behavior is like this and if there are any solutions to this?


Get this bounty!!!

#StackBounty: #magento-1.9 #database #mssql Add connection to MS SQL database

Bounty: 50

I want to add a connection to our ERP database that uses MS-Server, but i can’t figure out what I’m doing wrong.

I know how to connect to another MySQL DB, but for MSSQL?

config.xml

<resources>
    <erp_db>
        <connection>
            <host><![CDATA[1.2.3.4somename]]></host>
            <username><![CDATA[user]></username>
            <password><![CDATA[password]]></password>
            <dbname><![CDATA[db_name]]></dbname>
            <!-- ??? -->
            <model>mssql</model>
            <type>pdo_mssql</type>
            <!-- ??? -->
            <active>1</active>
        </connection>
    </erp_db>
    <erp_write>
        <connection>
            <use>erp_db</use>
        </connection>
    </erp_write>
    <erp_read>
        <connection>
            <use>erp_db</use>
        </connection>
    </erp_read>
    <erp_setup>
        <connection>
            <use>core_setup</use>
        </connection>
    </erp_setup>
</resources>

If I try this to list all tables …

$resource   = Mage::getSingleton('core/resource');
$connection = $resource->getConnection('erp_db');
$results    = $connection->fetchAll('SELECT * FROM sysobjects WHERE xtype="U"');
var_dump($results);

I get …

Fatal error: Class name must be a valid object or a string in /app/code/core/Mage/Core/Model/Resource.php on line 225

I also read Using MS SQL with Magento 1.9, some say it’s not supported, but from comments it seems to be possible …

The PDO adapter exists in Zend_Db_Adapter_Pdo_Mssql, but how to correctly use it?


Get this bounty!!!

#StackBounty: #magento-1.9 #php #shipping-methods #fedex Display fedex shipping rate in product page magento 1.9

Bounty: 50

I read the similar question but no luck.

I am working in magento 1.9. I want to display shipping rate in product view page. I have zipcode textbox in product page. After enter zipcode I want to display shipping charges in the same page.

I tried the following code. It is displaying changes but the actuall prices are different that means in checkout page the same zipcode charges are different. and by using following code the charges are different.

$shippingblock = $this->getLayout()->createBlock('checkout/cart_shipping');
        $quote = Mage::getModel('sales/quote');

        $shippingAddress = $quote->getShippingAddress();
        $shippingAddress->setCountryId('country');
        $shippingAddress->setPostcode('zipcode');
        $shippingAddress->setCollectShippingRates(true);


        $quote->addProduct($_product);
        $quote->getShippingAddress()->collectTotals();
        $quote->getShippingAddress()->setCollectShippingRates(true);
        $quote->getShippingAddress()->collectShippingRates();

        $rates = $quote->getShippingAddress()->getGroupedAllShippingRates();


        if(empty($rates)){
             echo  Mage::helper('shipping')->__('There are no rates available');
        }


        foreach ($rates as $code=>$rate) {
            $carierName = '
' . $shippingblock->getCarrierName($code) .'
'; echo $carierName; foreach($rate as $r){ $price = Mage::helper('core')->currency($r->getPrice(), true, false); $rates = '<div>' . $r->getMethodTitle() . ' <strong>' . $price .' </strong>'; echo $rates; } }

Any other way to display fedex charges in product page ? I am using default fedex method.


Get this bounty!!!

#StackBounty: #magento-1.9 #database #magento1.9.3 #cash-on-delivery #pincodes How to add more pincodes in Cash on Delivery restriction…

Bounty: 50

I am using custom module Cash on delivery restriction by zipcodes for Magento 1.9.3.7

enter image description here
I am having an issue to add pincodes more than 10 thousand. This module only accepts 8 thousand pincodes.

here is Observer class

<?php
class Mfp_Cod_Model_Observer {
public function getCashOnDelvery(Varien_Event_Observer $observer) {
        $event           = $observer->getEvent();
        $method          = $event->getMethodInstance();
        $result          = $event->getResult();
        $isModuleEnable = Mage::getStoreConfig('cod/cod/enable');

        if($isModuleEnable) {

            if($method->getCode() == 'phoenix_cashondelivery' ){

                $quote = Mage::getSingleton('checkout/cart')->getQuote();
                $add = $quote->getShippingAddress();
                $postcode = $add->getData('postcode');

                $comparisonMode = Mage::getStoreConfig('cod/cod/mode');
                $zipCodes = Mage::getStoreConfig('cod/cod/zipcode');
                $isExist = false;

                if(trim($zipCodes) == '') {             
                    $result->isAvailable = true;
                } else {    

                    if(strpos($zipCodes, $postcode) !==  false) {
                        $isExist = true;
                    }


                    if($isExist != true) {

                        $zipCodesArray = explode(',', nl2br($zipCodes));
                        if(count($elementLineArray) > 1) {
                            foreach($zipCodesArray as $codzipLine) {
                                $elementLineArray = explode('-', $codzipLine);
                                if(count($elementLineArray) == 2 && ( $postcode >= $elementLineArray[0] && $postcode <= $elementLineArray[1] )) {
                                    $isExist = true;
                                    break;
                                } else if($postcode == $codzipLine) {
                                    $isExist = true;
                                    break;
                                }
                            }
                        }
                    }

                    $returnValue = '';
                        $returnValue = ($isExist)?true:false;

                    $result->isAvailable = $returnValue;

                }   

            } 
        }   
      }
    }

can anyone help me to resolve this issue. is there any limitation for data saving. How can I add more than 10 thousand zipcodes?


Get this bounty!!!

#StackBounty: #magento-1.9 #database #ce-1.9.0.1 #ce-1.9.1.0 #magento1.9.3 How to add more pincodes in Cash on Delivery restriction mod…

Bounty: 50

I am using custom module Cash on delivery restriction by zipcodes for magento 1.9.3.7

enter image description here
I am having issue to add pincode more than 10 thousand. This module only excepts 8 thousand pincodes.

here is Observer class

public function getCashOnDelvery(Varien_Event_Observer $observer) {
    $event           = $observer->getEvent();
    $method          = $event->getMethodInstance();
    $result          = $event->getResult();
    $isModuleEnable = Mage::getStoreConfig('cod/cod/enable');

    if($isModuleEnable) {

        if($method->getCode() == 'phoenix_cashondelivery' ){

            $quote = Mage::getSingleton('checkout/cart')->getQuote();
            $add = $quote->getShippingAddress();
            $postcode = $add->getData('postcode');

            $comparisonMode = Mage::getStoreConfig('cod/cod/mode');
            $zipCodes = Mage::getStoreConfig('cod/cod/zipcode');
            $isExist = false;

            if(trim($zipCodes) == '') {             
                $result->isAvailable = true;
            } else {    

                if(strpos($zipCodes, $postcode) !==  false) {
                    $isExist = true;
                }


                if($isExist != true) {

                    $zipCodesArray = explode(',', nl2br($zipCodes));
                    if(count($elementLineArray) > 1) {
                        foreach($zipCodesArray as $codzipLine) {
                            $elementLineArray = explode('-', $codzipLine);
                            if(count($elementLineArray) == 2 && ( $postcode >= $elementLineArray[0] && $postcode <= $elementLineArray[1] )) {
                                $isExist = true;
                                break;
                            } else if($postcode == $codzipLine) {
                                $isExist = true;
                                break;
                            }
                        }
                    }
                }

                $returnValue = '';
                    $returnValue = ($isExist)?true:false;

                $result->isAvailable = $returnValue;

            }   

        } 
    }   
}

}

can anyone help me to resolve this issue. is there any limitation for data saving. How can I add more than 10 thousand zipcodes?


Get this bounty!!!