CHASE Response Directory

Here is the attachment for CHASE Response error tracking report will help you to trace the error while processing the orders.

Download the Orbital CHASE Gateway Interface Specification

Advertisements

Magento : Orbitz CHASE Paymentech

MagentoCommerce is a direct response to the emerging new needs of today’s online merchants. More than any feature or functionality what our clients really needs is “flexibility.” is done through the magento.

We have a lot of payment gateways today to integrate with our e-commerce application. Here we see how to integrate one of the leading Gateway provider CHASE Payment Tech Gateway in Magento Commerce.


1. Creating CHASE Payment Module:-


The CHASE Payment Module is created by including the set of Magento Commerce extension to create the new payment method.

Using Magento Module Creator to implement the Payment Module template for both Administrator and Client Section. The module creator as seen on below screen.

Module_Creator

Module_Creator

The module is get created and integrated into our existing magento application by specifying the above parameter properly as mentioned above. The Parameters are Name Space, Module, Magento Root Directory, Design Interface and Design.

The new payment gateway gets installed in the /App/Core/Code/local folder without disturbing the existing payment gateways.


Note:


Once the new payment module installed properly, go to the /var/cache folder and delete all the files inside the folder and then run the application, the new changes get reflected.


2. CHASE Module in Administrator Section:-


CHASE Paymentech Module has to be integrated in the administration section to update the Merchant ID, Terminal ID and Gateway URL as seen in the below screen.


payment_module

payment_module


3. CHASE Module in Client Section:-

The Orbtiz Chase Module on the Client Section will look like as seen in the below screen (c) once the payment module is integrated in the magento application using the Module Creator,

CHASE Client

CHASE Client



4. Payment Processing with CHASE:-


Once the payment process method for the CHASE module integrated in the client side, the paymentmethod.php will do the back end process reading the card detail and sent to the CHASE Paymentech and return the response from the CHASE.


The paymentmethod.php is located in the new module created by using Module Creator, and it’s located in


/app/local/CHASE_Paymentech/Orbitz/Model/PaymentMethod.php,


You can download the code from the following clicking the below link.

The PHP code will explain you the process of reading the card information from the client side and post it to the CHASE using the payment gateway and receive the response back from the CHASE.

Here some piece of the code will explain you the some specific task,


4.1. Specifing the Payment gateway URL,


Payment Gateway URL for Production –

https://orbital1.paymentech.net’

https://orbital2.paymentech.net’

Payment Gateway URL for Test –

https://orbitalvar2.paymentech.net/authorize’

</span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:small;"><span><span> </span>$value = Mage::getStoreConfig('payment/newmodule/cgi_url');</span></span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:small;"><span><span> </span>if (!$value || $value === false) {</span></span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:small;"><span><span> </span>return 'https://orbital1.paymentech.net';<span> </span></span></span></p>
<p class="MsoNormal" style="text-indent:.5in;margin:0 0 0 .5in;"><span style="font-size:small;"><span><span> </span>}</span></span></p>
<p class="MsoNormal" style="margin:0 0 0 .5in;"><span style="font-size:small;"><span><span> </span>return $value;</span></span></p>
<p class="MsoNormal" style="text-indent:.5in;margin:0;"><span>


The Authorize and Capture event is done on the each order process. The Credit Card is get processed the specified amount sent as XML Request; the xml request was constructed as below,

</span></span></p>
<p class="MsoNormal" style="margin:0;"><span><span><span style="font-size:small;"> </span></span><span style="font-size:7pt;"><span> </span>$xml="&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span><span> </span>$xml .= "&lt;Request&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;NewOrder&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;IndustryType&gt;EC&lt;/IndustryType&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;MessageType&gt;AC&lt;/MessageType&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;BIN&gt;".htmlentities(trim($this-&gt;getConfigData('bin_no')),ENT_QUOTES, 'UTF-8')."&lt;/BIN&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;MerchantID&gt;".htmlentities(trim($this-&gt;getConfigData('merchant_id')),ENT_QUOTES, 'UTF-8')."&lt;/MerchantID&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;TerminalID&gt;".htmlentities(trim($this-&gt;getConfigData('terminal_id')),ENT_QUOTES, 'UTF-8')."&lt;/TerminalID&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;CardBrand&gt;".htmlentities(trim($payment-&gt;getCcType()),ENT_QUOTES, 'UTF-8')."&lt;/CardBrand&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;AccountNum&gt;".htmlentities(trim($payment-&gt;getCcNumber()),ENT_QUOTES, 'UTF-8')."&lt;/AccountNum&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;Exp&gt;".htmlentities(trim($exp),ENT_QUOTES, 'UTF-8')."&lt;/Exp&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>if(($payment-&gt;getCcType()=='VI') || ($payment-&gt;getCcType()=='DI')) {</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;CardSecValInd&gt;1&lt;/CardSecValInd&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>}</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;CardSecVal&gt;".htmlentities(trim($payment-&gt;getCcCid()),ENT_QUOTES, 'UTF-8')."&lt;/CardSecVal&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;AVSzip&gt;".htmlentities(trim($billing-&gt;getPostcode()),ENT_QUOTES, 'UTF-8')."&lt;/AVSzip&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;AVSaddress1&gt;".htmlentities(trim($billing-&gt;getStreet(1)),ENT_QUOTES, 'UTF-8')."&lt;/AVSaddress1&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;AVScity&gt;".htmlentities(trim($billing-&gt;getCity()),ENT_QUOTES, 'UTF-8')."&lt;/AVScity&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;AVSstate&gt;CA&lt;/AVSstate&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;AVSname&gt;".htmlentities(trim($billing-&gt;getFirstname()),ENT_QUOTES, 'UTF-8')."&lt;/AVSname&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;OrderID&gt;".htmlentities(trim($order-&gt;getIncrementId()),ENT_QUOTES, 'UTF-8')."&lt;/OrderID&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;Amount&gt;".htmlentities(trim($amt),ENT_QUOTES, 'UTF-8')."&lt;/Amount&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span><span> </span>$xml .= "&lt;Comments&gt;AC&lt;/Comments&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;ShippingRef&gt;&lt;/ShippingRef&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;/NewOrder&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:7pt;"><span><span> </span>$xml .= "&lt;/Request&gt;";</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span><span> </span>


The request is sent as CURL post to CHASE is as follows,


$http = new Varien_Http_Adapter_Curl();

$config = array(‘timeout’ => 30);

$http->setConfig($config);

$header= “POST /AUTHORIZE HTTP/1.0\r\n”;

$header.= “MIME-Version: 1.0\r\n”;

$header.= “Content-type: application/PTI40\r\n”;

$header.= “Content-length: “ .strlen($xml) . “\r\n”;

$header.= “Content-transfer-encoding: text\r\n”;

$header.= “Request-number: 1\r\n”;

$header.= “Document-type: Request\r\n”;

$header.= “Interface-Version: Test 1.4\r\n”;

$header.= “Connection: close \r\n\r\n”;

$header.= $xml;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,$this->getApiGatewayUrl());

curl_setopt($ch, CURLOPT_HEADER, false);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $header);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);


The CHASE response will get parsed from xml to array format and validate the response by each parameter as per the CHASE Certification_WS.


Same can be downloaded from CHASE Payment Method Code