Permalink
Browse files

Saving amount in Customer Insight now.

  • Loading branch information...
1 parent 07e56ec commit 27e9cd5bc5818e307a5302afed104decc151880c @arch85 arch85 committed Jun 29, 2012
@@ -559,7 +559,7 @@ public function authorize(Varien_Object $payment, $amount)
if( $ordersource != "recurring" )
$this->populateSubscription($payment);
- Mage::helper("palorus")->saveCustomerInsight($payment, $litleResponse);
+ Mage::helper("palorus")->saveCustomerInsight($payment, $litleResponse, $amount);
Mage::helper("palorus")->saveVault($payment, $litleResponse, $this->getTokenInfo($payment));
}
}
@@ -636,7 +636,7 @@ public function capture (Varien_Object $payment, $amount)
if( $ordersource != "recurring" )
$this->populateSubscription($payment);
- Mage::helper("palorus")->saveCustomerInsight($payment, $litleResponse);
+ Mage::helper("palorus")->saveCustomerInsight($payment, $litleResponse, $amount);
Mage::helper("palorus")->saveVault($payment, $litleResponse);
}
@@ -37,7 +37,7 @@
class Litle_Palorus_Helper_Data extends Mage_Core_Helper_Abstract
{
- public function saveCustomerInsight($payment, $litleResponse) {
+ public function saveCustomerInsight($payment, $litleResponse, $amount) {
preg_match('/.*(\d\d\d\d)/', $payment->getCcNumber(), $matches);
$last4 = $matches[1];
$data = array(
@@ -46,7 +46,7 @@ public function saveCustomerInsight($payment, $litleResponse) {
'order_id' => $payment->getOrder()->getId(),
'affluence' => Litle_Palorus_Helper_Data::formatAffluence(XMLParser::getNode($litleResponse,"affluence")),
'last' => $last4,
- 'order_amount' => Litle_Palorus_Helper_Data::formatAvailableBalance($amountToPass),
+ 'order_amount' => Litle_Palorus_Helper_Data::formatAvailableBalance($amount),
'affluence' => Litle_Palorus_Helper_Data::formatAffluence(XMLParser::getNode($litleResponse,"affluence")),
'issuing_country' => XMLParser::getNode($litleResponse, 'issuerCountry'),
'prepaid_card_type' => Litle_Palorus_Helper_Data::formatPrepaidCardType(XMLParser::getNode($litleResponse, 'prepaidCardType')),

0 comments on commit 27e9cd5

Please sign in to comment.