Version Notes
- Extended Checkout now correctly uses the adres2 label in combination with adres1 (Afterpay)
- Extended Checkout XML check is now only done for Afterpay
- Fixed creating order in back-end bug
- Added phonenumber check for Extended Checkout for Dutch Countries (Afterpay)
- Afterpay now requires Tax Calculation Method Based on Unit Price, otherwise will be hidden.
Download this release
Release Info
| Developer | Olaf Abbenhuis |
| Extension | Icepay_IceAdvanced |
| Version | 1.1.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.2 to 1.1.3
- app/code/community/Icepay/IceAdvanced/Helper/Data.php +145 -134
- app/code/community/Icepay/IceAdvanced/Model/Checkout/Standard.php +34 -21
- app/code/community/Icepay/IceAdvanced/Model/Extensions/MW/GiftWrap.php +44 -0
- app/code/community/Icepay/IceAdvanced/Model/Mysql4/IceAdvanced.php +1 -1
- app/code/community/Icepay/IceAdvanced/Model/Observer.php +10 -0
- app/code/community/Icepay/IceAdvanced/Model/Pay.php +82 -76
- app/code/community/Icepay/IceAdvanced/Model/icepay_api_order.php +15 -134
- app/code/community/Icepay/IceAdvanced/controllers/ProcessingController.php +1 -1
- app/code/community/Icepay/IceAdvanced/etc/config.xml +1 -1
- app/code/community/Icepay/IceCore/Helper/Data.php +1 -1
- app/code/community/Icepay/IceCore/Model/Icepay/Webservice/Api.php +120 -129
- app/code/community/Icepay/IceCore/etc/config.xml +1 -1
- package.xml +10 -5
app/code/community/Icepay/IceAdvanced/Helper/Data.php
CHANGED
|
@@ -13,146 +13,157 @@
|
|
| 13 |
* charged in accordance with the standard ICEPAY tariffs.
|
| 14 |
*
|
| 15 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
public $filteredPaymentmethods = array("SMS", "PHONE");
|
| 31 |
-
|
| 32 |
-
/* For admin */
|
| 33 |
-
public function doChecks(){
|
| 34 |
-
$lines = array();
|
| 35 |
-
$checkMerchant = true;
|
| 36 |
-
$checkCode = true;
|
| 37 |
-
|
| 38 |
-
/* Check Merchant ID */
|
| 39 |
-
$check = Mage::helper("icecore")->validateMerchantID($this->getValueForStore(Icepay_IceCore_Model_Config::MERCHANTID));
|
| 40 |
-
array_push($lines, array(
|
| 41 |
-
'id' => "merchantid",
|
| 42 |
-
'line' => $check["msg"],
|
| 43 |
-
'result' => ($check["val"]?"ok":"err")));
|
| 44 |
-
$checkMerchant = $check["val"]?true:false;
|
| 45 |
-
|
| 46 |
-
/* Check SecretCode */
|
| 47 |
-
$check = Mage::helper("icecore")->validateSecretCode($this->getValueForStore(Icepay_IceCore_Model_Config::SECRETCODE));
|
| 48 |
-
array_push($lines, array(
|
| 49 |
-
'id' => "secretcode",
|
| 50 |
-
'line' => $check["msg"],
|
| 51 |
-
'result' => ($check["val"]?"ok":"err")));
|
| 52 |
-
$checkCode = $check["val"]?true:false;
|
| 53 |
-
|
| 54 |
-
/* The MerchantID and SecretCode checks will not be displayed in this module */
|
| 55 |
-
if (!$checkMerchant || !$checkCode){
|
| 56 |
-
$lines = array();
|
| 57 |
-
array_push($lines, array(
|
| 58 |
-
'id' => "merchant",
|
| 59 |
-
'line' => $this->__("Merchant settings are incorrect"),
|
| 60 |
-
'result' => "err"));
|
| 61 |
-
|
| 62 |
-
} else $lines = array();
|
| 63 |
-
|
| 64 |
-
/* Check SOAP */
|
| 65 |
-
$check = Mage::helper("icecore")->hasSOAP();
|
| 66 |
-
array_push($lines, array(
|
| 67 |
-
'id' => "soap",
|
| 68 |
-
'line' => ($check)?$this->__("SOAP webservices available"):$this->__("SOAP was not found on this server"),
|
| 69 |
-
'result' => ($check)?"ok":"err"));
|
| 70 |
-
|
| 71 |
-
/* Check Paymentmethods */
|
| 72 |
-
$showDefault = true;
|
| 73 |
-
|
| 74 |
-
if (Mage::helper("icecore")->adminGetFrontScope()){
|
| 75 |
-
$check = $this->countStoredPaymentmethods(Mage::helper("icecore")->adminGetStoreScopeID());
|
| 76 |
-
array_push($lines, array(
|
| 77 |
-
'id' => "database",
|
| 78 |
-
'line' => $check["msg"],
|
| 79 |
-
'result' => ($check["val"])?"ok":"err"));
|
| 80 |
-
if ($check["val"]) $showDefault = false;
|
| 81 |
-
};
|
| 82 |
-
|
| 83 |
-
/* Check Default Paymentmethods */
|
| 84 |
-
if ($showDefault){
|
| 85 |
-
$check = $this->countStoredPaymentmethods(0);
|
| 86 |
-
array_push($lines, array(
|
| 87 |
-
'id' => "default_database",
|
| 88 |
-
'line' => $check["msg"],
|
| 89 |
-
'result' => ($check["val"])?"ok":"err"));
|
| 90 |
-
}
|
| 91 |
-
|
| 92 |
-
return $lines;
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
public function getPaymentmethodExtraSettings(){
|
| 96 |
-
return array(
|
| 97 |
-
"description",
|
| 98 |
-
//"active_issuers",
|
| 99 |
-
"allowspecific",
|
| 100 |
-
"specificcountry",
|
| 101 |
-
"min_order_total",
|
| 102 |
-
"max_order_total",
|
| 103 |
-
"sort_order"
|
| 104 |
-
);
|
| 105 |
}
|
| 106 |
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
return $return;
|
| 127 |
-
}
|
| 128 |
-
|
| 129 |
-
public function addIcons($obj, $isArray=false){
|
| 130 |
-
|
| 131 |
-
if ($isArray){
|
| 132 |
-
foreach ($obj as $key => $value){
|
| 133 |
-
$issuerData = unserialize(urldecode($value["issuers"]));
|
| 134 |
-
$img = Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($value["code"]));
|
| 135 |
-
$obj[$key]["Image"] = ($img)?$img:$value["code"];
|
| 136 |
-
}
|
| 137 |
-
} else {
|
| 138 |
-
foreach($obj as $key => $value){
|
| 139 |
-
$img = Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($value->PaymentMethodCode));
|
| 140 |
-
$obj[$key]->Image = ($img)?$img:$value->PaymentMethodCode;
|
| 141 |
-
};
|
| 142 |
-
}
|
| 143 |
-
|
| 144 |
-
return $obj;
|
| 145 |
-
}
|
| 146 |
-
|
| 147 |
-
public function getIssuerArray($value){
|
| 148 |
-
return unserialize(urldecode($value));
|
| 149 |
}
|
| 150 |
|
|
|
|
|
|
|
| 151 |
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
}
|
| 156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
|
| 158 |
}
|
| 13 |
* charged in accordance with the standard ICEPAY tariffs.
|
| 14 |
*
|
| 15 |
*/
|
| 16 |
+
class Icepay_IceAdvanced_Helper_Data extends Mage_Core_Helper_Abstract {
|
| 17 |
+
/* Install values */
|
| 18 |
+
|
| 19 |
+
public $title = "Advanced";
|
| 20 |
+
public $version = "1.1.3";
|
| 21 |
+
public $id = "ADV";
|
| 22 |
+
public $fingerprint = "7f4de76ecbf7d847caeba64c42938a6a05821c4f";
|
| 23 |
+
public $compatibility_oldest_version = "1.5.0.0";
|
| 24 |
+
public $compatibility_latest_version = "1.7.0.2";
|
| 25 |
+
public $section = "iceadvanced";
|
| 26 |
+
public $serial_required = "0";
|
| 27 |
+
public $filteredPaymentmethods = array("SMS", "PHONE");
|
| 28 |
+
|
| 29 |
+
/* For admin */
|
| 30 |
+
|
| 31 |
+
public function doChecks() {
|
| 32 |
+
|
| 33 |
+
$lines = array();
|
| 34 |
+
$checkMerchant = true;
|
| 35 |
+
$checkCode = true;
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
/* Check Merchant ID */
|
| 40 |
+
$check = Mage::helper("icecore")->validateMerchantID($this->getValueForStore(Icepay_IceCore_Model_Config::MERCHANTID));
|
| 41 |
+
array_push($lines, array(
|
| 42 |
+
'id' => "merchantid",
|
| 43 |
+
'line' => $check["msg"],
|
| 44 |
+
'result' => ($check["val"] ? "ok" : "err")));
|
| 45 |
+
$checkMerchant = $check["val"] ? true : false;
|
| 46 |
+
|
| 47 |
+
/* Check SecretCode */
|
| 48 |
+
$check = Mage::helper("icecore")->validateSecretCode($this->getValueForStore(Icepay_IceCore_Model_Config::SECRETCODE));
|
| 49 |
+
array_push($lines, array(
|
| 50 |
+
'id' => "secretcode",
|
| 51 |
+
'line' => $check["msg"],
|
| 52 |
+
'result' => ($check["val"] ? "ok" : "err")));
|
| 53 |
+
$checkCode = $check["val"] ? true : false;
|
| 54 |
+
|
| 55 |
+
/* The MerchantID and SecretCode checks will not be displayed in this module */
|
| 56 |
+
if (!$checkMerchant || !$checkCode) {
|
| 57 |
+
$lines = array();
|
| 58 |
+
array_push($lines, array(
|
| 59 |
+
'id' => "merchant",
|
| 60 |
+
'line' => $this->__("Merchant settings are incorrect"),
|
| 61 |
+
'result' => "err"));
|
| 62 |
+
} else
|
| 63 |
+
$lines = array();
|
| 64 |
+
|
| 65 |
+
/* Check SOAP */
|
| 66 |
+
$check = Mage::helper("icecore")->hasSOAP();
|
| 67 |
+
array_push($lines, array(
|
| 68 |
+
'id' => "soap",
|
| 69 |
+
'line' => ($check) ? $this->__("SOAP webservices available") : $this->__("SOAP was not found on this server"),
|
| 70 |
+
'result' => ($check) ? "ok" : "err"));
|
| 71 |
+
|
| 72 |
+
/* Check Paymentmethods */
|
| 73 |
+
$showDefault = true;
|
| 74 |
+
|
| 75 |
+
if (Mage::helper("icecore")->adminGetFrontScope()) {
|
| 76 |
+
$check = $this->countStoredPaymentmethods(Mage::helper("icecore")->adminGetStoreScopeID());
|
| 77 |
+
array_push($lines, array(
|
| 78 |
+
'id' => "database",
|
| 79 |
+
'line' => $check["msg"],
|
| 80 |
+
'result' => ($check["val"]) ? "ok" : "err"));
|
| 81 |
+
if ($check["val"])
|
| 82 |
+
$showDefault = false;
|
| 83 |
+
};
|
| 84 |
+
|
| 85 |
+
/* Check Default Paymentmethods */
|
| 86 |
+
if ($showDefault) {
|
| 87 |
+
$check = $this->countStoredPaymentmethods(0);
|
| 88 |
+
array_push($lines, array(
|
| 89 |
+
'id' => "default_database",
|
| 90 |
+
'line' => $check["msg"],
|
| 91 |
+
'result' => ($check["val"]) ? "ok" : "err"));
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
$adv_sql = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
|
| 95 |
+
|
| 96 |
+
if ($adv_sql->getPMbyCode('afterpay')) {
|
| 97 |
+
if (Mage::getModel('tax/config')->getAlgorithm() != Mage_Tax_Model_Calculation::CALC_UNIT_BASE)
|
| 98 |
+
array_push($lines, array(
|
| 99 |
+
'id' => "tax",
|
| 100 |
+
'line' => "In order to use Afterpay you must have set the Tax Calculation Method Based On Unit Price.",
|
| 101 |
+
'result' => "err"));
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
return $lines;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
public function getPaymentmethodExtraSettings() {
|
| 108 |
+
return array(
|
| 109 |
+
"description",
|
| 110 |
+
//"active_issuers",
|
| 111 |
+
"allowspecific",
|
| 112 |
+
"specificcountry",
|
| 113 |
+
"min_order_total",
|
| 114 |
+
"max_order_total",
|
| 115 |
+
"sort_order"
|
| 116 |
+
);
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
public function countStoredPaymentmethods($storeID) {
|
| 120 |
|
| 121 |
+
$adv_sql = Mage::getSingleton('iceadvanced/mysql4_iceAdvanced');
|
| 122 |
+
$adv_sql->setScope($storeID);
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
$count = $adv_sql->countPaymentMethods();
|
| 127 |
+
|
| 128 |
+
if ($storeID == 0) {
|
| 129 |
+
$return = array('val' => false, 'msg' => $this->__("No paymentmethods stored in Default settings"));
|
| 130 |
+
$langvar = $this->__("%s paymentmethods stored in Default settings");
|
| 131 |
+
} else {
|
| 132 |
+
$return = array('val' => false, 'msg' => $this->__("No paymentmethods stored for this Store view"));
|
| 133 |
+
$langvar = $this->__("%s paymentmethods stored for this Store view");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
}
|
| 135 |
|
| 136 |
+
if ($count > 0)
|
| 137 |
+
$return = array('val' => true, 'msg' => sprintf($langvar, $count));
|
| 138 |
+
|
| 139 |
+
return $return;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
public function addIcons($obj, $isArray = false) {
|
| 143 |
+
|
| 144 |
+
if ($isArray) {
|
| 145 |
+
foreach ($obj as $key => $value) {
|
| 146 |
+
$issuerData = unserialize(urldecode($value["issuers"]));
|
| 147 |
+
$img = Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($value["code"]));
|
| 148 |
+
$obj[$key]["Image"] = ($img) ? $img : $value["code"];
|
| 149 |
+
}
|
| 150 |
+
} else {
|
| 151 |
+
foreach ($obj as $key => $value) {
|
| 152 |
+
$img = Mage::helper("icecore")->toIcon(Mage::helper("icecore")->cleanString($value->PaymentMethodCode));
|
| 153 |
+
$obj[$key]->Image = ($img) ? $img : $value->PaymentMethodCode;
|
| 154 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
}
|
| 156 |
|
| 157 |
+
return $obj;
|
| 158 |
+
}
|
| 159 |
|
| 160 |
+
public function getIssuerArray($value) {
|
| 161 |
+
return unserialize(urldecode($value));
|
| 162 |
+
}
|
|
|
|
| 163 |
|
| 164 |
+
protected function getValueForStore($val) {
|
| 165 |
+
$store = Mage::helper('icecore')->getStoreScopeID();
|
| 166 |
+
return Mage::helper('icecore')->getConfigForStore($store, $val);
|
| 167 |
+
}
|
| 168 |
|
| 169 |
}
|
app/code/community/Icepay/IceAdvanced/Model/Checkout/Standard.php
CHANGED
|
@@ -83,34 +83,48 @@ class Icepay_IceAdvanced_Model_Checkout_Standard extends Mage_Payment_Model_Meth
|
|
| 83 |
}
|
| 84 |
|
| 85 |
public function isAvailable($quote = null) {
|
| 86 |
-
$this->_quote = $quote;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
-
$this->checkEqualBillingAndShippingCountry($quote);
|
| 89 |
-
|
| 90 |
if ($this->getActive() && parent::isAvailable($quote))
|
| 91 |
return true;
|
|
|
|
| 92 |
return false;
|
| 93 |
}
|
| 94 |
-
|
| 95 |
-
private function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
$billingCountry = $quote->getBillingAddress()->getCountry();
|
| 97 |
$shippingCountry = $quote->getShippingAddress()->getCountry();
|
| 98 |
-
|
| 99 |
-
if (isset($billingCountry) && isset($shippingCountry)) {
|
| 100 |
-
if ($
|
| 101 |
-
|
| 102 |
-
return false;
|
| 103 |
-
}
|
| 104 |
}
|
| 105 |
-
}
|
|
|
|
|
|
|
| 106 |
}
|
| 107 |
|
| 108 |
-
public function getActive() {
|
| 109 |
if ($this->getConfigData("active") != 1)
|
| 110 |
return false;
|
| 111 |
if ($this->getConfigData("active_issuers") == "")
|
| 112 |
return false;
|
| 113 |
-
|
| 114 |
return $this->coreSQL()->isActive(Mage::helper("iceadvanced")->section);
|
| 115 |
}
|
| 116 |
|
|
@@ -164,19 +178,18 @@ class Icepay_IceAdvanced_Model_Checkout_Standard extends Mage_Payment_Model_Meth
|
|
| 164 |
return $filtered_issuers;
|
| 165 |
}
|
| 166 |
|
| 167 |
-
public function filterByAmountForCountry($issuers, $country) {
|
| 168 |
-
|
| 169 |
-
|
|
|
|
|
|
|
| 170 |
return $issuers;
|
| 171 |
}
|
| 172 |
-
*
|
| 173 |
-
*/
|
| 174 |
|
| 175 |
-
$grandTotal = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal();
|
| 176 |
$grandTotal = $grandTotal * 100;
|
| 177 |
|
| 178 |
$filtered_issuers = array();
|
| 179 |
-
|
| 180 |
foreach ($issuers as $key => $issuer) {
|
| 181 |
$issuerMinimum = unserialize($issuer['issuer_minimum']);
|
| 182 |
$issuerMaximum = unserialize($issuer['issuer_maximum']);
|
| 83 |
}
|
| 84 |
|
| 85 |
public function isAvailable($quote = null) {
|
| 86 |
+
$this->_quote = $quote;
|
| 87 |
+
|
| 88 |
+
if (strtoupper($this->getConfigData('pm_code')) == 'AFTERPAY') {
|
| 89 |
+
if (!$this->checkEqualBillingAndShippingCountry($quote))
|
| 90 |
+
return false;
|
| 91 |
+
|
| 92 |
+
if (!$this->checkTaxCalculationUnitBase())
|
| 93 |
+
return false;
|
| 94 |
+
}
|
| 95 |
|
|
|
|
|
|
|
| 96 |
if ($this->getActive() && parent::isAvailable($quote))
|
| 97 |
return true;
|
| 98 |
+
|
| 99 |
return false;
|
| 100 |
}
|
| 101 |
+
|
| 102 |
+
private function checkTaxCalculationUnitBase() {
|
| 103 |
+
if (Mage::getModel('tax/config')->getAlgorithm() != Mage_Tax_Model_Calculation::CALC_UNIT_BASE)
|
| 104 |
+
return false;
|
| 105 |
+
|
| 106 |
+
return true;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
private function checkEqualBillingAndShippingCountry($quote) {
|
| 110 |
$billingCountry = $quote->getBillingAddress()->getCountry();
|
| 111 |
$shippingCountry = $quote->getShippingAddress()->getCountry();
|
| 112 |
+
|
| 113 |
+
if (isset($billingCountry) && isset($shippingCountry)) {
|
| 114 |
+
if ($billingCountry != $shippingCountry) {
|
| 115 |
+
return false;
|
|
|
|
|
|
|
| 116 |
}
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
return true;
|
| 120 |
}
|
| 121 |
|
| 122 |
+
public function getActive() {
|
| 123 |
if ($this->getConfigData("active") != 1)
|
| 124 |
return false;
|
| 125 |
if ($this->getConfigData("active_issuers") == "")
|
| 126 |
return false;
|
| 127 |
+
|
| 128 |
return $this->coreSQL()->isActive(Mage::helper("iceadvanced")->section);
|
| 129 |
}
|
| 130 |
|
| 178 |
return $filtered_issuers;
|
| 179 |
}
|
| 180 |
|
| 181 |
+
public function filterByAmountForCountry($issuers, $country) {
|
| 182 |
+
$grandTotal = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal();
|
| 183 |
+
|
| 184 |
+
// Order is being created from admin
|
| 185 |
+
if (is_null($grandTotal)) {
|
| 186 |
return $issuers;
|
| 187 |
}
|
|
|
|
|
|
|
| 188 |
|
|
|
|
| 189 |
$grandTotal = $grandTotal * 100;
|
| 190 |
|
| 191 |
$filtered_issuers = array();
|
| 192 |
+
|
| 193 |
foreach ($issuers as $key => $issuer) {
|
| 194 |
$issuerMinimum = unserialize($issuer['issuer_minimum']);
|
| 195 |
$issuerMaximum = unserialize($issuer['issuer_maximum']);
|
app/code/community/Icepay/IceAdvanced/Model/Extensions/MW/GiftWrap.php
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Icepay_IceAdvanced_Model_Extensions_MW_GiftWrap extends Mage_Payment_Model_Method_Abstract {
|
| 4 |
+
|
| 5 |
+
public function isGiftWrapInstalled() {
|
| 6 |
+
$modules = Mage::getConfig()->getNode('modules')->children();
|
| 7 |
+
$modulesArray = (array) $modules;
|
| 8 |
+
|
| 9 |
+
if (isset($modulesArray['MW_GiftWrap'])) {
|
| 10 |
+
return true;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
return false;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
public function addGiftWrapPrices($quoteID) {
|
| 17 |
+
$collections1 = Mage::getModel('giftwrap/quote')->getCollection()
|
| 18 |
+
->addFieldToFilter('quote_id', array('eq' => $quoteID));
|
| 19 |
+
|
| 20 |
+
foreach ($collections1 as $collection1) {
|
| 21 |
+
$productID = '00';
|
| 22 |
+
$productQuantity = '1';
|
| 23 |
+
$giftPrice = $collection1->getPrice();
|
| 24 |
+
|
| 25 |
+
$collections2 = Mage::getModel('giftwrap/quoteitem')->getCollection()
|
| 26 |
+
->addFieldToFilter('gw_quote_id', array('eq' => $collection1->getEntityId()));
|
| 27 |
+
foreach ($collections2 as $collection2) {
|
| 28 |
+
$productID = $collection2->getProductId();
|
| 29 |
+
$productQuantity = $collection2->getQuantity();
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
Icepay_Order::getInstance()
|
| 33 |
+
->addProduct(Icepay_Order_Product::create()
|
| 34 |
+
->setProductID($productID)
|
| 35 |
+
->setProductName('Gift Wrapping')
|
| 36 |
+
->setDescription('Gift Wrapping')
|
| 37 |
+
->setQuantity($productQuantity)
|
| 38 |
+
->setUnitPrice($giftPrice * 100)
|
| 39 |
+
->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage(0))
|
| 40 |
+
);
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
}
|
app/code/community/Icepay/IceAdvanced/Model/Mysql4/IceAdvanced.php
CHANGED
|
@@ -112,7 +112,7 @@ class Icepay_IceAdvanced_Model_Mysql4_IceAdvanced extends Mage_Core_Model_Mysql4
|
|
| 112 |
return $pm['pm_id'];
|
| 113 |
}
|
| 114 |
|
| 115 |
-
|
| 116 |
$select = $this->doSQL()
|
| 117 |
->select()
|
| 118 |
->from($this->getTable("iceadvanced/{$this->pm_table}"), array('pm_id'))
|
| 112 |
return $pm['pm_id'];
|
| 113 |
}
|
| 114 |
|
| 115 |
+
public function getPMbyCode($code){
|
| 116 |
$select = $this->doSQL()
|
| 117 |
->select()
|
| 118 |
->from($this->getTable("iceadvanced/{$this->pm_table}"), array('pm_id'))
|
app/code/community/Icepay/IceAdvanced/Model/Observer.php
CHANGED
|
@@ -59,6 +59,16 @@ class Icepay_IceAdvanced_Model_Observer extends Mage_Payment_Block_Form_Containe
|
|
| 59 |
$message = "Your postal code is incorrect, must be in 11111 format.";
|
| 60 |
break;
|
| 61 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
if ($message) {
|
| 64 |
Mage::getSingleton('checkout/session')->addError($message);
|
| 59 |
$message = "Your postal code is incorrect, must be in 11111 format.";
|
| 60 |
break;
|
| 61 |
}
|
| 62 |
+
|
| 63 |
+
$phoneNumber = Mage::getSingleton('checkout/session')->getQuote()->getBillingAddress()->getTelephone();
|
| 64 |
+
|
| 65 |
+
switch (Mage::getSingleton('checkout/session')->getQuote()->getBillingAddress()->getCountry()) {
|
| 66 |
+
case 'NL':
|
| 67 |
+
if (!preg_match('/^\(?\+?\d{1,3}\)?\s?-?\s?[\d\s]*$/', $phoneNumber) OR strlen($phoneNumber) < 10) {
|
| 68 |
+
$message = "Your phonenumber is incorrect.";
|
| 69 |
+
}
|
| 70 |
+
break;
|
| 71 |
+
}
|
| 72 |
|
| 73 |
if ($message) {
|
| 74 |
Mage::getSingleton('checkout/session')->addError($message);
|
app/code/community/Icepay/IceAdvanced/Model/Pay.php
CHANGED
|
@@ -24,7 +24,6 @@ class Icepay_IceAdvanced_Model_Pay extends Mage_Payment_Model_Method_Abstract {
|
|
| 24 |
}
|
| 25 |
|
| 26 |
public function getCheckoutResult() {
|
| 27 |
-
|
| 28 |
$session = $this->getCheckout();
|
| 29 |
$icedata = $this->sqlModel->loadPaymentByID($session->getLastRealOrderId());
|
| 30 |
|
|
@@ -39,90 +38,97 @@ class Icepay_IceAdvanced_Model_Pay extends Mage_Payment_Model_Method_Abstract {
|
|
| 39 |
|
| 40 |
$order = Mage::getModel('sales/order')->loadByIncrementId($paymentData['ic_orderid']);
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
);
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
->setCountry($order->getShippingAddress()->getCountry())
|
| 82 |
-
);
|
| 83 |
-
|
| 84 |
-
$orderItems = $order->getItemsCollection();
|
| 85 |
-
|
| 86 |
-
foreach ($orderItems as $item) {
|
| 87 |
-
$itemData = $item->getData();
|
| 88 |
-
|
| 89 |
-
$product = Mage::getModel('catalog/product')->load($itemData['product_id']);
|
| 90 |
-
$productData = $product->getData();
|
| 91 |
-
|
| 92 |
-
$itemData['price'] * $itemData['tax_percent'];
|
| 93 |
-
|
| 94 |
-
if ($productData['tax_class_id'] == '0')
|
| 95 |
-
$itemData['tax_percent'] = -1;
|
| 96 |
-
|
| 97 |
-
$itemData['description'] = (isset($itemData['description'])) ? $itemData['description'] : '';
|
| 98 |
-
// Add the products
|
| 99 |
-
$ic_order->addProduct(Icepay_Order_Product::create()
|
| 100 |
-
->setProductID($itemData['item_id'])
|
| 101 |
-
->setProductName($itemData['name'])
|
| 102 |
-
->setDescription($itemData['description'])
|
| 103 |
-
->setQuantity(round($itemData['qty_ordered']))
|
| 104 |
-
->setUnitPrice($itemData['price_incl_tax'] * 100)
|
| 105 |
-
->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage($itemData['tax_percent']))
|
| 106 |
);
|
| 107 |
-
}
|
| 108 |
|
| 109 |
-
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
if ($discount != '0')
|
| 115 |
-
$ic_order->setOrderDiscountAmount(-$discount);
|
| 116 |
|
| 117 |
-
|
| 118 |
-
$shippingCosts = ($orderData['shipping_amount'] + $orderData['shipping_tax_amount']) * 100;
|
| 119 |
-
$shippingTax = $orderData['shipping_tax_amount'] / $orderData['shipping_amount'] * 100;
|
| 120 |
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
-
// Log the XML Send
|
| 124 |
-
Mage::helper("icecore")->log(serialize(Icepay_Order::getInstance()->createXML()));
|
| 125 |
-
|
| 126 |
try {
|
| 127 |
$checkoutResult = $webservice->doCheckout(
|
| 128 |
$paymentData['ic_amount'], $paymentData['ic_country'], $paymentData['ic_currency'], $paymentData['ic_language'], $paymentData['ic_description'], $paymentData['ic_paymentmethod'], $paymentData['ic_issuer'], $paymentData['ic_orderid'], $paymentData['ic_reference']
|
| 24 |
}
|
| 25 |
|
| 26 |
public function getCheckoutResult() {
|
|
|
|
| 27 |
$session = $this->getCheckout();
|
| 28 |
$icedata = $this->sqlModel->loadPaymentByID($session->getLastRealOrderId());
|
| 29 |
|
| 38 |
|
| 39 |
$order = Mage::getModel('sales/order')->loadByIncrementId($paymentData['ic_orderid']);
|
| 40 |
|
| 41 |
+
if (strtoupper($paymentData['ic_paymentmethod']) == 'AFTERPAY') {
|
| 42 |
+
// Fetch the Icepay_Order class
|
| 43 |
+
$ic_order = Icepay_Order::getInstance();
|
| 44 |
|
| 45 |
+
// Set consumer information
|
| 46 |
+
$ic_order->setConsumer(Icepay_Order_Consumer::create()
|
| 47 |
+
->setConsumerID($order->getCustomerName())
|
| 48 |
+
->setEmail($order->getCustomerEmail())
|
| 49 |
+
->setPhone($order->getBillingAddress()->getTelephone())
|
| 50 |
+
);
|
| 51 |
|
| 52 |
+
$billingStreetaddress = implode(' ', $order->getBillingAddress()->getStreet());
|
| 53 |
+
|
| 54 |
+
// Set the billing address
|
| 55 |
+
$ic_order->setBillingAddress(Icepay_Order_Address::create()
|
| 56 |
+
->setInitials($order->getBillingAddress()->getFirstname())
|
| 57 |
+
->setPrefix($order->getBillingAddress()->getPrefix())
|
| 58 |
+
->setLastName($order->getBillingAddress()->getLastname())
|
| 59 |
+
->setStreet(Icepay_Order_Helper::getStreetFromAddress($billingStreetaddress))
|
| 60 |
+
->setHouseNumber(Icepay_Order_Helper::getHouseNumberFromAddress())
|
| 61 |
+
->setHouseNumberAddition(Icepay_Order_Helper::getHouseNumberAdditionFromAddress())
|
| 62 |
+
->setZipCode($order->getBillingAddress()->getPostcode())
|
| 63 |
+
->setCity($order->getBillingAddress()->getCity())
|
| 64 |
+
->setCountry($order->getBillingAddress()->getCountry())
|
| 65 |
+
);
|
|
|
|
| 66 |
|
| 67 |
+
$shippingStreetAddress = implode(' ', $order->getShippingAddress()->getStreet());
|
| 68 |
+
|
| 69 |
+
// Set the shipping address
|
| 70 |
+
$ic_order->setShippingAddress(Icepay_Order_Address::create()
|
| 71 |
+
->setInitials($order->getShippingAddress()->getFirstname())
|
| 72 |
+
->setPrefix($order->getShippingAddress()->getPrefix())
|
| 73 |
+
->setLastName($order->getShippingAddress()->getLastname())
|
| 74 |
+
->setStreet(Icepay_Order_Helper::getStreetFromAddress($shippingStreetAddress))
|
| 75 |
+
->setHouseNumber(Icepay_Order_Helper::getHouseNumberFromAddress())
|
| 76 |
+
->setHouseNumberAddition(Icepay_Order_Helper::getHouseNumberAdditionFromAddress())
|
| 77 |
+
->setZipCode($order->getShippingAddress()->getPostcode())
|
| 78 |
+
->setCity($order->getShippingAddress()->getCity())
|
| 79 |
+
->setCountry($order->getShippingAddress()->getCountry())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
);
|
|
|
|
| 81 |
|
| 82 |
+
$orderItems = $order->getItemsCollection();
|
| 83 |
+
|
| 84 |
+
foreach ($orderItems as $item) {
|
| 85 |
+
$itemData = $item->getData();
|
| 86 |
|
| 87 |
+
$product = Mage::getModel('catalog/product')->load($itemData['product_id']);
|
| 88 |
+
$productData = $product->getData();
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
+
$itemData['price'] * $itemData['tax_percent'];
|
|
|
|
|
|
|
| 91 |
|
| 92 |
+
if ($productData['tax_class_id'] == '0')
|
| 93 |
+
$itemData['tax_percent'] = -1;
|
| 94 |
+
|
| 95 |
+
$itemData['description'] = (isset($itemData['description'])) ? $itemData['description'] : '';
|
| 96 |
+
// Add the products
|
| 97 |
+
$ic_order->addProduct(Icepay_Order_Product::create()
|
| 98 |
+
->setProductID($itemData['item_id'])
|
| 99 |
+
->setProductName($itemData['name'])
|
| 100 |
+
->setDescription($itemData['description'])
|
| 101 |
+
->setQuantity(round($itemData['qty_ordered']))
|
| 102 |
+
->setUnitPrice($itemData['price_incl_tax'] * 100)
|
| 103 |
+
->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage($itemData['tax_percent']))
|
| 104 |
+
);
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
$orderData = $order->getData();
|
| 108 |
+
|
| 109 |
+
// Set total order discount if any
|
| 110 |
+
$discount = $orderData['base_discount_amount'] * 100;
|
| 111 |
+
|
| 112 |
+
if ($discount != '0')
|
| 113 |
+
$ic_order->setOrderDiscountAmount(-$discount);
|
| 114 |
+
|
| 115 |
+
// Set shipping costs
|
| 116 |
+
$shippingCosts = ($orderData['shipping_amount'] + $orderData['shipping_tax_amount']) * 100;
|
| 117 |
+
$shippingTax = $orderData['shipping_tax_amount'] / $orderData['shipping_amount'] * 100;
|
| 118 |
+
|
| 119 |
+
$ic_order->setShippingCosts($shippingCosts, $shippingTax);
|
| 120 |
+
|
| 121 |
+
// There should be a general extension model that checks if extension is installed, instead of giving each extension an isInstalled function
|
| 122 |
+
$giftWrapExtension = Mage::getModel('iceadvanced/extensions_MW_GiftWrap');
|
| 123 |
+
|
| 124 |
+
if ($giftWrapExtension->isGiftWrapInstalled()) {
|
| 125 |
+
$giftWrapExtension->addGiftWrapPrices($session->getLastQuoteId());
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
// Log the XML Send
|
| 129 |
+
Mage::helper("icecore")->log(serialize(Icepay_Order::getInstance()->createXML()));
|
| 130 |
+
}
|
| 131 |
|
|
|
|
|
|
|
|
|
|
| 132 |
try {
|
| 133 |
$checkoutResult = $webservice->doCheckout(
|
| 134 |
$paymentData['ic_amount'], $paymentData['ic_country'], $paymentData['ic_currency'], $paymentData['ic_language'], $paymentData['ic_description'], $paymentData['ic_paymentmethod'], $paymentData['ic_issuer'], $paymentData['ic_orderid'], $paymentData['ic_reference']
|
app/code/community/Icepay/IceAdvanced/Model/icepay_api_order.php
CHANGED
|
@@ -7,7 +7,6 @@
|
|
| 7 |
*
|
| 8 |
* @version 1.0.0
|
| 9 |
*
|
| 10 |
-
* @package API_Webservice_Pay_Order
|
| 11 |
* @author Wouter van Tilburg
|
| 12 |
* @author Olaf Abbenhuis
|
| 13 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
|
@@ -141,28 +140,9 @@ class Icepay_Order_Helper {
|
|
| 141 |
*
|
| 142 |
* The product object contains all information about the customers address
|
| 143 |
* You can add as many products as you want, just remember that the total amount for the products must match the total amount of the Icepay Payment Object
|
| 144 |
-
*
|
| 145 |
-
* Icepay_Order_Product may be used the following way:
|
| 146 |
-
* <pre>
|
| 147 |
-
* $product = Icepay_Order_Product::create()
|
| 148 |
-
* ->setProductID('1')
|
| 149 |
-
* ->setProductName('iPhone')
|
| 150 |
-
* ->setDescription('Test Description')
|
| 151 |
-
* ->setQuantity('1')
|
| 152 |
-
* ->setUnitPrice('200')
|
| 153 |
-
* ->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage(21))
|
| 154 |
-
* </pre>
|
| 155 |
-
*
|
| 156 |
-
* You add the product by using the addProduct method from {@link Icepay_Order}
|
| 157 |
-
* <pre>
|
| 158 |
-
* Icepay_Order::getInstance()->addProduct($product);
|
| 159 |
-
* </pre>
|
| 160 |
-
*
|
| 161 |
-
* @see Icepay_Order->addProduct()
|
| 162 |
-
*
|
| 163 |
* @version 1.0.0
|
| 164 |
*
|
| 165 |
-
* @package API_Webservice_Pay_Order
|
| 166 |
* @author Wouter van Tilburg
|
| 167 |
* @author Olaf Abbenhuis
|
| 168 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
|
@@ -287,34 +267,10 @@ class Icepay_Order_Product {
|
|
| 287 |
/**
|
| 288 |
* Icepay_Order_Address
|
| 289 |
*
|
| 290 |
-
* The address class contains all information about the consumer's address
|
| 291 |
-
*
|
| 292 |
-
* Icepay_Order_Address may be used the following way:
|
| 293 |
-
* <pre>
|
| 294 |
-
* $address = Icepay_Order_Address::create()
|
| 295 |
-
* ->setInitials('')
|
| 296 |
-
* ->setPrefix('Dhr.')
|
| 297 |
-
* ->setLastName('van Test')
|
| 298 |
-
* ->setStreet('Zandstraat')
|
| 299 |
-
* ->setHouseNumber('10')
|
| 300 |
-
* ->setHouseNumberAddition('')
|
| 301 |
-
* ->setZipCode('2500AA')
|
| 302 |
-
* ->setCity('Amsterdam')
|
| 303 |
-
* ->setCountry('NL')
|
| 304 |
-
* </pre>
|
| 305 |
-
*
|
| 306 |
-
* You can set the adress by either using the setBillingAddress or setShippingAddress method from {@link Icepay_Order}
|
| 307 |
-
* <pre>
|
| 308 |
-
* Icepay_Order::getInstance()->setBillingAddress($address);
|
| 309 |
-
* Icepay_Order::getInstance()->setShippingAddress($address);
|
| 310 |
-
* </pre>
|
| 311 |
-
*
|
| 312 |
-
* @see Icepay_Order->setBillingAddress()
|
| 313 |
-
* @see Icepay_Order->setShippingAddress()
|
| 314 |
*
|
| 315 |
* @version 1.0.0
|
| 316 |
*
|
| 317 |
-
* @package API_Webservice_Pay_Order
|
| 318 |
* @author Wouter van Tilburg
|
| 319 |
* @author Olaf Abbenhuis
|
| 320 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
|
@@ -495,25 +451,9 @@ class Icepay_Order_Address {
|
|
| 495 |
* Icepay_Order_Consumer
|
| 496 |
*
|
| 497 |
* The consumer class contains all information about the consumer
|
| 498 |
-
*
|
| 499 |
-
* Icepay_Order_Consumer may be used the following way:
|
| 500 |
-
* <pre>
|
| 501 |
-
* $consumer = Icepay_Order_Consumer::create()
|
| 502 |
-
* ->setConsumerID('1')
|
| 503 |
-
* ->setEmail('test@test.com')
|
| 504 |
-
* ->setPhone('0612345678')
|
| 505 |
-
* </pre>
|
| 506 |
-
*
|
| 507 |
-
* You can set the adress by using setConsumer method from {@link Icepay_Order}
|
| 508 |
-
* <pre>
|
| 509 |
-
* Icepay_Order::getInstance()->setConsumer($consumer);
|
| 510 |
-
* </pre>
|
| 511 |
-
*
|
| 512 |
-
* @see Icepay_Order->setConsumer()
|
| 513 |
-
*
|
| 514 |
* @version 1.0.0
|
| 515 |
*
|
| 516 |
-
* @package API_Webservice_Pay_Order
|
| 517 |
* @author Wouter van Tilburg
|
| 518 |
* @author Olaf Abbenhuis
|
| 519 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
|
@@ -594,71 +534,8 @@ class Icepay_Order_Consumer {
|
|
| 594 |
*
|
| 595 |
* Contains all the order information and can generate it into XML for the extended checkout.
|
| 596 |
*
|
| 597 |
-
* Classes that are used:
|
| 598 |
-
* - {@link Icepay_Order_Consumer}
|
| 599 |
-
* - {@link Icepay_Order_Address}
|
| 600 |
-
* - {@link Icepay_Order_Product}
|
| 601 |
-
*
|
| 602 |
-
* A full example of how the Order Class works for the extendedCheckout with the classes above:
|
| 603 |
-
* <pre>
|
| 604 |
-
* Icepay_Order::getInstance()
|
| 605 |
-
* ->setConsumer(
|
| 606 |
-
* {@link Icepay_Order_Consumer}::create()
|
| 607 |
-
* ->setConsumerID('1')
|
| 608 |
-
* ->setEmail('test@test.com')
|
| 609 |
-
* ->setPhone('0612345678')
|
| 610 |
-
* )
|
| 611 |
-
* ->setShippingAddress(
|
| 612 |
-
* {@link Icepay_Order_Address}::create()
|
| 613 |
-
* ->setInitials('')
|
| 614 |
-
* ->setPrefix('Dhr.')
|
| 615 |
-
* ->setLastName('van Test')
|
| 616 |
-
* ->setStreet('Zandstraat')
|
| 617 |
-
* ->setHouseNumber('10')
|
| 618 |
-
* ->setHouseNumberAddition('')
|
| 619 |
-
* ->setZipCode('2500AA')
|
| 620 |
-
* ->setCity('Amsterdam')
|
| 621 |
-
* ->setCountry('NL')
|
| 622 |
-
* )
|
| 623 |
-
* ->setBillingAddress(
|
| 624 |
-
* {@link Icepay_Order_Address}::create()
|
| 625 |
-
* ->setInitials('')
|
| 626 |
-
* ->setPrefix('Dhr.')
|
| 627 |
-
* ->setLastName('van Test')
|
| 628 |
-
* ->setStreet('Zandstraat')
|
| 629 |
-
* ->setHouseNumber('10')
|
| 630 |
-
* ->setHouseNumberAddition('')
|
| 631 |
-
* ->setZipCode('2500AA')
|
| 632 |
-
* ->setCity('Amsterdam')
|
| 633 |
-
* ->setCountry('NL')
|
| 634 |
-
* )
|
| 635 |
-
* ->addProduct({@link Icepay_Order_Product}::create()
|
| 636 |
-
* ->setProductID('1')
|
| 637 |
-
* ->setProductName('iPhone 4')
|
| 638 |
-
* ->setDescription('Test Description')
|
| 639 |
-
* ->setQuantity('2')
|
| 640 |
-
* ->setUnitPrice('20000') // Amount must be in cents
|
| 641 |
-
* ->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage(21))
|
| 642 |
-
* )
|
| 643 |
-
* ->addProduct({@link Icepay_Order_Product}::create()
|
| 644 |
-
* ->setProductID('1')
|
| 645 |
-
* ->setProductName('iPhone 4S')
|
| 646 |
-
* ->setDescription('Test Description')
|
| 647 |
-
* ->setQuantity('1')
|
| 648 |
-
* ->setUnitPrice('90000') // Amount must be in cents
|
| 649 |
-
* ->setVATCategory(Icepay_Order_VAT::getCategoryForPercentage(21))
|
| 650 |
-
* )
|
| 651 |
-
* ->setShippingCosts(200);
|
| 652 |
-
* </pre>
|
| 653 |
-
*
|
| 654 |
-
*
|
| 655 |
-
* @see Icepay_Order_Consumer
|
| 656 |
-
* @see Icepay_Order_Address
|
| 657 |
-
* @see Icepay_Order_Product
|
| 658 |
-
*
|
| 659 |
* @version 1.0.0
|
| 660 |
*
|
| 661 |
-
* @package API_Webservice_Pay_Order
|
| 662 |
* @author Wouter van Tilburg
|
| 663 |
* @author Olaf Abbenhuis
|
| 664 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
|
@@ -670,9 +547,7 @@ class Icepay_Order {
|
|
| 670 |
private $_addressesNode;
|
| 671 |
private $_productsNode;
|
| 672 |
private static $instance;
|
| 673 |
-
|
| 674 |
-
private $_debug = false;
|
| 675 |
-
|
| 676 |
public $_data = Array();
|
| 677 |
|
| 678 |
public function setData($id, $obj) {
|
|
@@ -686,7 +561,7 @@ class Icepay_Order {
|
|
| 686 |
* @param obj Object containing the Icepay_Order_Consumer class
|
| 687 |
* @return \Icepay_Order
|
| 688 |
*/
|
| 689 |
-
public function setConsumer($obj) {
|
| 690 |
$this->setData("consumer", $obj);
|
| 691 |
return $this;
|
| 692 |
}
|
|
@@ -698,7 +573,7 @@ class Icepay_Order {
|
|
| 698 |
* @param obj Object containing the Icepay_Order_Address class
|
| 699 |
* @return \Icepay_Order
|
| 700 |
*/
|
| 701 |
-
public function setShippingAddress($obj) {
|
| 702 |
$this->setData("shippingAddress", $obj);
|
| 703 |
return $this;
|
| 704 |
}
|
|
@@ -710,7 +585,7 @@ class Icepay_Order {
|
|
| 710 |
* @param obj Object containing the Icepay_Order_Address class
|
| 711 |
* @return \Icepay_Order
|
| 712 |
*/
|
| 713 |
-
public function setBillingAddress($obj) {
|
| 714 |
$this->setData("billingAddress", $obj);
|
| 715 |
return $this;
|
| 716 |
}
|
|
@@ -722,7 +597,7 @@ class Icepay_Order {
|
|
| 722 |
* @param obj object containing the Icepay_Order_Product class
|
| 723 |
* @return \Icepay_Order
|
| 724 |
*/
|
| 725 |
-
public function addProduct($obj) {
|
| 726 |
if (!isset($this->_data["products"]))
|
| 727 |
$this->_data["products"] = Array();
|
| 728 |
array_push($this->_data["products"], $obj);
|
|
@@ -846,6 +721,12 @@ class Icepay_Order {
|
|
| 846 |
$this->array_to_xml($product, $productNode);
|
| 847 |
}
|
| 848 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 849 |
return $this->_orderData->asXML();
|
| 850 |
}
|
| 851 |
|
|
@@ -861,7 +742,7 @@ class Icepay_Order_VAT {
|
|
| 861 |
|
| 862 |
private static $categories = array();
|
| 863 |
|
| 864 |
-
public function setDefaultCategories() {
|
| 865 |
$ranges = array(
|
| 866 |
'zero' => 0,
|
| 867 |
'reduced-low' => array('1', '6'),
|
| 7 |
*
|
| 8 |
* @version 1.0.0
|
| 9 |
*
|
|
|
|
| 10 |
* @author Wouter van Tilburg
|
| 11 |
* @author Olaf Abbenhuis
|
| 12 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
| 140 |
*
|
| 141 |
* The product object contains all information about the customers address
|
| 142 |
* You can add as many products as you want, just remember that the total amount for the products must match the total amount of the Icepay Payment Object
|
| 143 |
+
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
* @version 1.0.0
|
| 145 |
*
|
|
|
|
| 146 |
* @author Wouter van Tilburg
|
| 147 |
* @author Olaf Abbenhuis
|
| 148 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
| 267 |
/**
|
| 268 |
* Icepay_Order_Address
|
| 269 |
*
|
| 270 |
+
* The address class contains all information about the consumer's address
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 271 |
*
|
| 272 |
* @version 1.0.0
|
| 273 |
*
|
|
|
|
| 274 |
* @author Wouter van Tilburg
|
| 275 |
* @author Olaf Abbenhuis
|
| 276 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
| 451 |
* Icepay_Order_Consumer
|
| 452 |
*
|
| 453 |
* The consumer class contains all information about the consumer
|
| 454 |
+
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 455 |
* @version 1.0.0
|
| 456 |
*
|
|
|
|
| 457 |
* @author Wouter van Tilburg
|
| 458 |
* @author Olaf Abbenhuis
|
| 459 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
| 534 |
*
|
| 535 |
* Contains all the order information and can generate it into XML for the extended checkout.
|
| 536 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 537 |
* @version 1.0.0
|
| 538 |
*
|
|
|
|
| 539 |
* @author Wouter van Tilburg
|
| 540 |
* @author Olaf Abbenhuis
|
| 541 |
* @copyright Copyright (c) 2011-2012, ICEPAY
|
| 547 |
private $_addressesNode;
|
| 548 |
private $_productsNode;
|
| 549 |
private static $instance;
|
| 550 |
+
private $_debug = true;
|
|
|
|
|
|
|
| 551 |
public $_data = Array();
|
| 552 |
|
| 553 |
public function setData($id, $obj) {
|
| 561 |
* @param obj Object containing the Icepay_Order_Consumer class
|
| 562 |
* @return \Icepay_Order
|
| 563 |
*/
|
| 564 |
+
public function setConsumer(Icepay_Order_Consumer $obj) {
|
| 565 |
$this->setData("consumer", $obj);
|
| 566 |
return $this;
|
| 567 |
}
|
| 573 |
* @param obj Object containing the Icepay_Order_Address class
|
| 574 |
* @return \Icepay_Order
|
| 575 |
*/
|
| 576 |
+
public function setShippingAddress(Icepay_Order_Address $obj) {
|
| 577 |
$this->setData("shippingAddress", $obj);
|
| 578 |
return $this;
|
| 579 |
}
|
| 585 |
* @param obj Object containing the Icepay_Order_Address class
|
| 586 |
* @return \Icepay_Order
|
| 587 |
*/
|
| 588 |
+
public function setBillingAddress(Icepay_Order_Address $obj) {
|
| 589 |
$this->setData("billingAddress", $obj);
|
| 590 |
return $this;
|
| 591 |
}
|
| 597 |
* @param obj object containing the Icepay_Order_Product class
|
| 598 |
* @return \Icepay_Order
|
| 599 |
*/
|
| 600 |
+
public function addProduct(Icepay_Order_Product $obj) {
|
| 601 |
if (!isset($this->_data["products"]))
|
| 602 |
$this->_data["products"] = Array();
|
| 603 |
array_push($this->_data["products"], $obj);
|
| 721 |
$this->array_to_xml($product, $productNode);
|
| 722 |
}
|
| 723 |
|
| 724 |
+
if ($this->_debug == true) {
|
| 725 |
+
header("Content-type: text/xml");
|
| 726 |
+
echo $this->_orderData->asXML();
|
| 727 |
+
exit;
|
| 728 |
+
}
|
| 729 |
+
|
| 730 |
return $this->_orderData->asXML();
|
| 731 |
}
|
| 732 |
|
| 742 |
|
| 743 |
private static $categories = array();
|
| 744 |
|
| 745 |
+
public static function setDefaultCategories() {
|
| 746 |
$ranges = array(
|
| 747 |
'zero' => 0,
|
| 748 |
'reduced-low' => array('1', '6'),
|
app/code/community/Icepay/IceAdvanced/controllers/ProcessingController.php
CHANGED
|
@@ -29,7 +29,7 @@ class Icepay_IceAdvanced_ProcessingController extends Mage_Core_Controller_Front
|
|
| 29 |
Mage::getSingleton('checkout/session')->setErrorMessage(sprintf($this->__("The payment provider has returned the following error message: %s"),$result));
|
| 30 |
parent::_redirect('checkout/onepage/failure');
|
| 31 |
} else {
|
| 32 |
-
$checkoutResult = ($result['CheckoutExtendedResult']) ? $result['CheckoutExtendedResult'] : $result['CheckoutResult'];
|
| 33 |
|
| 34 |
$this->getResponse()->setBody($this->__("Redirecting"))->setRedirect($checkoutResult->PaymentScreenURL);
|
| 35 |
}
|
| 29 |
Mage::getSingleton('checkout/session')->setErrorMessage(sprintf($this->__("The payment provider has returned the following error message: %s"),$result));
|
| 30 |
parent::_redirect('checkout/onepage/failure');
|
| 31 |
} else {
|
| 32 |
+
$checkoutResult = (isset($result['CheckoutExtendedResult'])) ? $result['CheckoutExtendedResult'] : $result['CheckoutResult'];
|
| 33 |
|
| 34 |
$this->getResponse()->setBody($this->__("Redirecting"))->setRedirect($checkoutResult->PaymentScreenURL);
|
| 35 |
}
|
app/code/community/Icepay/IceAdvanced/etc/config.xml
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<config>
|
| 4 |
<modules>
|
| 5 |
<Icepay_IceAdvanced>
|
| 6 |
-
<version>1.1.
|
| 7 |
</Icepay_IceAdvanced>
|
| 8 |
</modules>
|
| 9 |
<frontend>
|
| 3 |
<config>
|
| 4 |
<modules>
|
| 5 |
<Icepay_IceAdvanced>
|
| 6 |
+
<version>1.1.3</version>
|
| 7 |
</Icepay_IceAdvanced>
|
| 8 |
</modules>
|
| 9 |
<frontend>
|
app/code/community/Icepay/IceCore/Helper/Data.php
CHANGED
|
@@ -19,7 +19,7 @@ class Icepay_IceCore_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 19 |
|
| 20 |
/* Install values */
|
| 21 |
public $title = "Core";
|
| 22 |
-
public $version = "1.1.
|
| 23 |
public $id = "003";
|
| 24 |
public $fingerprint = "003";
|
| 25 |
public $compatibility_oldest_version = "1.5.0.0";
|
| 19 |
|
| 20 |
/* Install values */
|
| 21 |
public $title = "Core";
|
| 22 |
+
public $version = "1.1.3";
|
| 23 |
public $id = "003";
|
| 24 |
public $fingerprint = "003";
|
| 25 |
public $compatibility_oldest_version = "1.5.0.0";
|
app/code/community/Icepay/IceCore/Model/Icepay/Webservice/Api.php
CHANGED
|
@@ -13,143 +13,134 @@
|
|
| 13 |
* charged in accordance with the standard ICEPAY tariffs.
|
| 14 |
*
|
| 15 |
*/
|
|
|
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
protected $url = "https://connect.icepay.com/webservice/icepay.svc?wsdl";
|
| 25 |
-
|
| 26 |
-
public function webservice($merchantID, $secretCode){
|
| 27 |
-
|
| 28 |
-
$this->setMerchantID($merchantID);
|
| 29 |
-
$this->setSecretCode($secretCode);
|
| 30 |
-
|
| 31 |
-
$this->client = new SoapClient(
|
| 32 |
$this->url,
|
| 33 |
array(
|
| 34 |
-
|
| 35 |
-
|
| 36 |
)
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
return sha1(implode("|",$arr));
|
| 71 |
-
}
|
| 72 |
-
|
| 73 |
-
protected function getIP(){
|
| 74 |
-
return $_SERVER['REMOTE_ADDR'];
|
| 75 |
}
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
// Webservice methods below:
|
| 79 |
-
|
| 80 |
-
public function doCheckout(
|
| 81 |
-
$amount,
|
| 82 |
-
$country,
|
| 83 |
-
$currency,
|
| 84 |
-
$lang,
|
| 85 |
-
$descr,
|
| 86 |
-
$paymentmethod,
|
| 87 |
-
$issuer,
|
| 88 |
-
$orderID,
|
| 89 |
-
$reference,
|
| 90 |
-
$URLCompleted = "",
|
| 91 |
-
$URLError = ""
|
| 92 |
-
){
|
| 93 |
-
|
| 94 |
-
$obj = new stdClass();
|
| 95 |
-
|
| 96 |
-
// Must be in specific order for checksum ---------
|
| 97 |
-
$obj->MerchantID = $this->merchantID;
|
| 98 |
-
$obj->Timestamp = $this->getTimeStamp();
|
| 99 |
-
$obj->Amount = $amount;
|
| 100 |
-
$obj->Country = $country;
|
| 101 |
-
$obj->Currency = $currency;
|
| 102 |
-
$obj->Description = $descr;
|
| 103 |
-
$obj->EndUserIP = $this->getIP();
|
| 104 |
-
$obj->Issuer = $issuer;
|
| 105 |
-
$obj->Language = $lang;
|
| 106 |
-
$obj->OrderID = $orderID;
|
| 107 |
-
$obj->PaymentMethod = $paymentmethod;
|
| 108 |
-
$obj->Reference = $reference;
|
| 109 |
-
$obj->URLCompleted = $URLCompleted;
|
| 110 |
-
$obj->URLError = $URLError;
|
| 111 |
-
$obj->XML = Icepay_Order::getInstance()->createXML();
|
| 112 |
-
// ------------------------------------------------
|
| 113 |
-
$obj->Checksum = $this->generateChecksum($obj);
|
| 114 |
-
|
| 115 |
-
return (array)$this->client->CheckoutExtended(array('request'=>$obj));
|
| 116 |
-
}
|
| 117 |
-
|
| 118 |
-
public function getPayment($id){
|
| 119 |
-
|
| 120 |
-
$obj = null;
|
| 121 |
-
|
| 122 |
-
// Must be in specific order for checksum ---------
|
| 123 |
-
$obj->MerchantID = $this->merchantID;
|
| 124 |
-
$obj->Timestamp = $this->getTimeStamp();
|
| 125 |
-
$obj->PaymentID = $id;
|
| 126 |
-
|
| 127 |
-
// ------------------------------------------------
|
| 128 |
-
$obj->Checksum = $this->generateChecksum($obj);
|
| 129 |
-
return (array)$this->client->GetPayment(array('request'=>$obj));
|
| 130 |
-
}
|
| 131 |
-
|
| 132 |
-
public function getPremiumRateNumbers(){
|
| 133 |
-
|
| 134 |
-
$obj = null;
|
| 135 |
-
|
| 136 |
-
// Must be in specific order for checksum ---------
|
| 137 |
-
$obj->MerchantID = $this->merchantID;
|
| 138 |
-
$obj->Timestamp = $this->getTimeStamp();
|
| 139 |
-
|
| 140 |
-
// ------------------------------------------------
|
| 141 |
-
$obj->Checksum = $this->generateChecksum($obj);
|
| 142 |
-
return (array)$this->client->GetPremiumRateNumbers(array('request'=>$obj));
|
| 143 |
-
}
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
public function completeObject($obj){
|
| 148 |
-
$obj->Checksum = $this->generateChecksum($obj);
|
| 149 |
-
return $obj;
|
| 150 |
-
}
|
| 151 |
|
| 152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
?>
|
| 13 |
* charged in accordance with the standard ICEPAY tariffs.
|
| 14 |
*
|
| 15 |
*/
|
| 16 |
+
class Icepay_IceCore_Model_Icepay_Webservice_Api {
|
| 17 |
|
| 18 |
+
public $client; // SoapClient Object
|
| 19 |
+
protected $merchantID; // Integer
|
| 20 |
+
protected $secretCode; // String
|
| 21 |
+
protected $url = "https://connect.icepay.com/webservice/icepay.svc?wsdl";
|
| 22 |
|
| 23 |
+
public function webservice($merchantID, $secretCode) {
|
| 24 |
|
| 25 |
+
$this->setMerchantID($merchantID);
|
| 26 |
+
$this->setSecretCode($secretCode);
|
| 27 |
+
|
| 28 |
+
$this->client = new SoapClient(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
$this->url,
|
| 30 |
array(
|
| 31 |
+
"location" => $this->url,
|
| 32 |
+
'cache_wsdl' => 'WSDL_CACHE_NONE'
|
| 33 |
)
|
| 34 |
+
);
|
| 35 |
+
$this->client->soap_defencoding = "utf-8";
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
/* Setters */
|
| 39 |
+
|
| 40 |
+
public function setMerchantID($val) {
|
| 41 |
+
$this->merchantID = $val;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
public function setSecretCode($val) {
|
| 45 |
+
$this->secretCode = $val;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
/* Getters */
|
| 49 |
+
|
| 50 |
+
public function getMerchantID() {
|
| 51 |
+
return intval($this->merchantID);
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
public function getSecretCode() {
|
| 55 |
+
return $this->secretCode;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
protected function getTimeStamp() {
|
| 59 |
+
return gmdate("Y-m-d\TH:i:s\Z");
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
protected function generateChecksum($obj = null) {
|
| 63 |
+
$arr = array();
|
| 64 |
+
array_push($arr, $this->getSecretCode());
|
| 65 |
+
foreach ($obj as $val) {
|
| 66 |
+
array_push($arr, $val);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
}
|
| 68 |
+
return sha1(implode("|", $arr));
|
| 69 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
+
protected function getIP() {
|
| 72 |
+
return $_SERVER['REMOTE_ADDR'];
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
// Webservice methods below:
|
| 76 |
+
|
| 77 |
+
public function doCheckout(
|
| 78 |
+
$amount, $country, $currency, $lang, $descr, $paymentmethod, $issuer, $orderID, $reference, $URLCompleted = "", $URLError = ""
|
| 79 |
+
) {
|
| 80 |
+
|
| 81 |
+
$obj = new stdClass();
|
| 82 |
|
| 83 |
+
// Must be in specific order for checksum ---------
|
| 84 |
+
$obj->MerchantID = $this->merchantID;
|
| 85 |
+
$obj->Timestamp = $this->getTimeStamp();
|
| 86 |
+
$obj->Amount = $amount;
|
| 87 |
+
$obj->Country = $country;
|
| 88 |
+
$obj->Currency = $currency;
|
| 89 |
+
$obj->Description = $descr;
|
| 90 |
+
$obj->EndUserIP = $this->getIP();
|
| 91 |
+
$obj->Issuer = $issuer;
|
| 92 |
+
$obj->Language = $lang;
|
| 93 |
+
$obj->OrderID = $orderID;
|
| 94 |
+
$obj->PaymentMethod = $paymentmethod;
|
| 95 |
+
$obj->Reference = $reference;
|
| 96 |
+
$obj->URLCompleted = $URLCompleted;
|
| 97 |
+
$obj->URLError = $URLError;
|
| 98 |
+
|
| 99 |
+
if (strtoupper($paymentmethod) == 'AFTERPAY')
|
| 100 |
+
$obj->XML = Icepay_Order::getInstance()->createXML();
|
| 101 |
+
|
| 102 |
+
// ------------------------------------------------
|
| 103 |
+
$obj->Checksum = $this->generateChecksum($obj);
|
| 104 |
+
|
| 105 |
+
if (strtoupper($paymentmethod) == 'AFTERPAY') {
|
| 106 |
+
return (array) $this->client->CheckoutExtended(array('request' => $obj));
|
| 107 |
+
} else {
|
| 108 |
+
return (array) $this->client->Checkout(array('request' => $obj));
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
public function getPayment($id) {
|
| 113 |
+
|
| 114 |
+
$obj = null;
|
| 115 |
+
|
| 116 |
+
// Must be in specific order for checksum ---------
|
| 117 |
+
$obj->MerchantID = $this->merchantID;
|
| 118 |
+
$obj->Timestamp = $this->getTimeStamp();
|
| 119 |
+
$obj->PaymentID = $id;
|
| 120 |
+
|
| 121 |
+
// ------------------------------------------------
|
| 122 |
+
$obj->Checksum = $this->generateChecksum($obj);
|
| 123 |
+
return (array) $this->client->GetPayment(array('request' => $obj));
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
public function getPremiumRateNumbers() {
|
| 127 |
+
|
| 128 |
+
$obj = null;
|
| 129 |
+
|
| 130 |
+
// Must be in specific order for checksum ---------
|
| 131 |
+
$obj->MerchantID = $this->merchantID;
|
| 132 |
+
$obj->Timestamp = $this->getTimeStamp();
|
| 133 |
+
|
| 134 |
+
// ------------------------------------------------
|
| 135 |
+
$obj->Checksum = $this->generateChecksum($obj);
|
| 136 |
+
return (array) $this->client->GetPremiumRateNumbers(array('request' => $obj));
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
public function completeObject($obj) {
|
| 140 |
+
$obj->Checksum = $this->generateChecksum($obj);
|
| 141 |
+
return $obj;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
}
|
| 145 |
|
| 146 |
?>
|
app/code/community/Icepay/IceCore/etc/config.xml
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<config>
|
| 4 |
<modules>
|
| 5 |
<Icepay_IceCore>
|
| 6 |
-
<version>1.1.
|
| 7 |
</Icepay_IceCore>
|
| 8 |
</modules>
|
| 9 |
<frontend>
|
| 3 |
<config>
|
| 4 |
<modules>
|
| 5 |
<Icepay_IceCore>
|
| 6 |
+
<version>1.1.3</version>
|
| 7 |
</Icepay_IceCore>
|
| 8 |
</modules>
|
| 9 |
<frontend>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Icepay_IceAdvanced</name>
|
| 4 |
-
<version>1.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Commercial</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -11,11 +11,16 @@ www.icepay.com</summary>
|
|
| 11 |
<description>Enables payments using payment service provider ICEPAY.
|
| 12 |
The Advanced extension includes webservice support
|
| 13 |
This package also contains the Icepay_IceCore extension.</description>
|
| 14 |
-
<notes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
<authors><author><name>Olaf Abbenhuis</name><user>Zechiel</user><email>olaf.abbenhuis@icepay.com</email></author><author><name>Wouter van Tilburg</name><user>wvantilburg</user><email>wouter@icepay.eu</email></author></authors>
|
| 16 |
-
<date>2013-
|
| 17 |
-
<time>
|
| 18 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Icepay_IceCore.xml" hash="268e777c318f1cd6258a56c3049ac678"/><file name="Icepay_IceAdvanced.xml" hash="069d0a2d2c7a34e366bc2b79483cd2b4"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Icepay_IceCore.csv" hash="e0d67599dc2088767b8ae2b1b601fec8"/><file name="Icepay_IceAdvanced.csv" hash="dd3ba59aeac6ac11d4071bd3529767cd"/></dir><dir name="nl_NL"><file name="Icepay_IceCore.csv" hash="becf356de17d63f4cd237e03b1d704e8"/><file name="Icepay_IceAdvanced.csv" hash="5d1d00bd9add8b1fcb61cd10ee5fa2af"/></dir><dir name="de_DE"><file name="Icepay_IceAdvanced.csv" hash="3cae75009684ac7a1b4afb6667d6a477"/><file name="Icepay_IceCore.csv" hash="e8ad59c02f83d67b31e7bbef3ede043e"/></dir><dir name="es_ES"><file name="Icepay_IceAdvanced.csv" hash="f469c13d48a7361d0346fd29181c8370"/><file name="Icepay_IceCore.csv" hash="fa46bf1feedc31495401dfab9e4232d6"/></dir><dir name="fr_FR"><file name="Icepay_IceAdvanced.csv" hash="66ae26a1d9f20009878f19673d2d67b0"/><file name="Icepay_IceCore.csv" hash="5191576073b592b4285a983cc7fd17dc"/></dir><dir name="it_IT"><file name="Icepay_IceAdvanced.csv" hash="114d8290130a9f090efe210484eff1b9"/><file name="Icepay_IceCore.csv" hash="351fdc02d699cf65d763da8a44479f42"/></dir></target><target name="magecommunity"><dir name="Icepay"><dir name="IceCore"><dir><dir name="Block"><dir name="Adminhtml"><file name="CheckSettings.php" hash="1e37aaa21895b1536895d4b2f2063061"/><file name="GenerateURL.php" hash="1b085eef7e7baff781c814376ab99314"/><dir name="Grid"><file name="Modules.php" hash="10bd64d92a0f0366d6a3ac2a19953725"/></dir><file name="Init.php" hash="0ec5a603fe82b11d7a0a3e7c82265e1a"/></dir><dir name="Front"><file name="Statement.php" hash="85ee089622ff4a3bc15d08f0a2e80813"/><file name="Template.php" hash="06eb31a4a51dc6ee7143d6c8866131d6"/></dir></dir><dir name="Helper"><file name="Data.php" hash="54ceeb9b7a7627688d67bd6fd3c4c711"/></dir><dir name="Model"><file name="Config.php" hash="952b1621e8df054150a357b11f4af177"/><dir name="Icepay"><file name="Postback.php" hash="de72128ef99aa20a4affb5b6c27f9af3"/><file name="Result.php" hash="4bfc63bf6d76d0ddf3045bd855ff9ccc"/><dir name="Webservice"><file name="Api.php" hash="a9b94b45eb4d3646f5ed0fc4dd862062"/></dir></dir><dir name="Mysql4"><file name="IceCore.php" hash="d796f09db791d857f257c3ad5ac9e84a"/></dir></dir><dir name="controllers"><file name="AboutController.php" hash="9ca5a652dbf27e57cc7bbcb7ed073e1b"/><file name="CheckController.php" hash="901adc45f9c44fa5b1a11dd36eb025d1"/><file name="IndexController.php" hash="01d74f3579ebf469788ee6e7e41d7b21"/><file name="ProcessingController.php" hash="4cbedbf49193562e9739b0a3d00b3dda"/></dir><dir name="etc"><file name="config.xml" hash="94bf11745f9d2b7c4cd33c00085fb20f"/><file name="system.xml" hash="9497988c9b4c53db90c59b57867e9de5"/></dir><dir name="sql"><dir name="icepaycore_setup"><file name="mysql4-install-1.0.0.php" hash="bc37063c45b48e52a7e12584daf82aef"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="b1b1dfd41f1aff682dcf34fb544e922e"/></dir></dir></dir></dir><dir name="IceAdvanced"><dir><dir name="Block"><dir name="Adminhtml"><file name="CheckSettings.php" hash="1e9e08f5414b22dd84557ade567aba48"/><dir name="Grid"><file name="Paymentmethods.php" hash="50c3b5812161ef9831b7d3bd33addf92"/></dir><dir name="Setting"><file name="Paymentmethod.php" hash="dc5548c4bfde0375c3431d8d9972da1f"/></dir></dir><dir name="Payment"><dir name="Form"><file name="Default.php" hash="f96542cd1e5f13f3639ddc93b9c0172c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="660700f899eea3c9ec59c2013efd0cd5"/></dir><dir name="Model"><dir name="Checkout"><dir name="Placeholder"><file name="Paymentmethod01.php" hash="b825da0ac49ce5fba409116b2a46bf4f"/><file name="Paymentmethod02.php" hash="202eac322f5cd2df65034476d3e87dd5"/><file name="Paymentmethod03.php" hash="1f193436b77bed331837ab64d148c977"/><file name="Paymentmethod04.php" hash="3d4775f70070381a492b7207fce0d606"/><file name="Paymentmethod05.php" hash="16f86a94192131bddd0f078501c277d2"/><file name="Paymentmethod06.php" hash="113c6788b168790700d2baacbdbcb20c"/><file name="Paymentmethod07.php" hash="50635324e7913f864af6a32a65e299bb"/><file name="Paymentmethod08.php" hash="dba0bf1fb39667ff4b94dcea6821d372"/><file name="Paymentmethod09.php" hash="0029e9dcbb989ac4c6ae686b5d2db262"/><file name="Paymentmethod10.php" hash="94ff83c6d23c879f27c958de595bff3b"/><file name="Paymentmethod11.php" hash="4725cefbb4cdc69d12961853b4c00d13"/><file name="Paymentmethod12.php" hash="b82d7e8830a7b22f942496614d84f2ed"/><file name="Paymentmethod13.php" hash="43f18f4948afc2f7613b3ad47baa2577"/><file name="Paymentmethod14.php" hash="a04a63494d6e4df283049abfe35f57f8"/><file name="Paymentmethod15.php" hash="a5d02861c4668c74492b1865d471afdf"/><file name="Paymentmethod16.php" hash="a9d90c5414e27f814aa7b1ff1e212682"/><file name="Paymentmethod17.php" hash="e55127cbf73fecbb8ec66848f300c414"/><file name="Paymentmethod18.php" hash="388c76235c1c35a97ab8893d1f672807"/><file name="Paymentmethod19.php" hash="454f5142fb3e17152c137a052e13294c"/><file name="Paymentmethod20.php" hash="638b60e75678908fc92df8b1469a2500"/></dir><file name="Standard.php" hash="21a2ae6d87aebee45969dc1ce9af9be1"/></dir><dir name="Mysql4"><file name="IceAdvanced.php" hash="bce2adeff36c156155589d005423a3d1"/></dir><file name="Observer.php" hash="0574ffc9fd37921dffb9f3d3761f8cec"/><file name="Pay.php" hash="066ca7b2034ea3e4dcdc4b793fd09780"/><file name="Webservice.php" hash="a174ae0689c94abfff98b5c7731f9827"/><file name="icepay_api_order.php" hash="d3793e2594b010ed4da44683b8513414"/></dir><dir name="controllers"><file name="AjaxController.php" hash="5663eb36613923b2ccd9ede56787a0c9"/><file name="ConfigController.php" hash="9be40c50c69981034a9787a1f2e005f1"/><file name="ProcessingController.php" hash="2f53e02b23bd7216dda988fb3de58073"/></dir><dir name="etc"><file name="config.xml" hash="db78c206576743b068d7941378e9cd55"/><file name="system.xml" hash="d8b509ef49a7037cca8f5215a0551fd3"/></dir><dir name="sql"><dir name="icepayadvanced_setup"><file name="mysql4-install-1.0.0.php" hash="f0b069a3503871e8221dc30441012e56"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="6c771822888f14d9679f6b4ab71719c0"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="icepay"><file name="icepay-logo.png" hash="155f2d4dd137423ccbc3d4037cf46d5f"/><file name="logo-currence.png" hash="fa37b87e496d9955ef455e96251bd434"/><file name="logo-thawte.png" hash="dcf93e2d0631b1e2853ce8380d80c125"/><file name="logo-thuiswinkel.png" hash="4a54a5f4e09988a4b16697fe54a462e7"/><file name="nologo.png" hash="72e977c925c8b6c70ff5fb69c0e054c8"/><dir name="nl"><file name="afterpay.png" hash="b9d37ce8c7daad7939f25d4f3f522d28"/><file name="creditcard.png" hash="1036251ede1a09299feecb75043d6e16"/><file name="ddebit.png" hash="2efd78c91a6558f0e5e71a4cdc6f82e4"/><file name="directebank.png" hash="70c2f9d0c6726b7b4b72b97437ed137b"/><file name="elv.png" hash="cdb571467e6e3f0718887ea5c6e9dc24"/><file name="giropay.png" hash="57167e2c98a48f3a24b1743e74f6158a"/><file name="icepay.png" hash="39a55d71460ccce2b65517ce40d3826a"/><file name="ideal.png" hash="fc18c3e422e4163afee4646623b2569b"/><file name="mistercash.png" hash="84164ec464031eb983cf971c93883291"/><file name="nologo.png" hash="59b4f3e8abf4cd51d1c5ab9f1a425999"/><file name="paypal.png" hash="944b54460b95c4842ce19982264e577d"/><file name="paysafecard.png" hash="23deaae36aa2cb0d7ef1c04804e30145"/><file name="wallie.png" hash="489236d8a7d678f355d6401a1f34dd5b"/><file name="wire.png" hash="63be6b74df1fc107d31e7830756ae39b"/></dir><dir name="en"><file name="afterpay.png" hash="b9d37ce8c7daad7939f25d4f3f522d28"/><file name="creditcard.png" hash="1036251ede1a09299feecb75043d6e16"/><file name="ddebit.png" hash="408f41a0650a204cadb791c3e1b0e1a1"/><file name="directebank.png" hash="65bea681edb8442463b96ca0a6d2f604"/><file name="elv.png" hash="cdb571467e6e3f0718887ea5c6e9dc24"/><file name="giropay.png" hash="57167e2c98a48f3a24b1743e74f6158a"/><file name="icepay.png" hash="39a55d71460ccce2b65517ce40d3826a"/><file name="ideal.png" hash="fc18c3e422e4163afee4646623b2569b"/><file name="mistercash.png" hash="84164ec464031eb983cf971c93883291"/><file name="nologo.png" hash="72e977c925c8b6c70ff5fb69c0e054c8"/><file name="paypal.png" hash="944b54460b95c4842ce19982264e577d"/><file name="paysafecard.png" hash="23deaae36aa2cb0d7ef1c04804e30145"/><file name="wallie.png" hash="489236d8a7d678f355d6401a1f34dd5b"/><file name="wire.png" hash="d61bac01ea81d71bebc03f484b883c12"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="icepay"><file name="admin.css" hash="21126dd9de5b86311f8bd9ff8da82f8f"/><file name="general.css" hash="f2d7fc0cfb170a997892a6a3589cf7fc"/><dir name="images"><file name="icepay-logo.png" hash="584d79128e6df216e9f7304329158b56"/><file name="section-logo.png" hash="5242ece5dd1434831174ef7fba8c2c4a"/><file name="error_msg_icon.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="success_msg_icon.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="button-manual.png" hash="7b708db3c8915897a4e3526389b7e3b2"/><file name="button-movie.png" hash="c164da277349322fcd4480ece39d6e00"/><dir name="nl"><file name="afterpay.png" hash="a3b02f6f3e53f548d58d2da794f4c900"/><file name="creditcard.png" hash="48a101cac247f07311ef3ccf1075092d"/><file name="ddebit.png" hash="89793240543046ce977a11eee9b99368"/><file name="directebank.png" hash="ec990be24336501593956872b5a69a0c"/><file name="elv.png" hash="af722d1a80025fbef18faf9baafe91e3"/><file name="giropay.png" hash="5e167cb8dbe05391b1ecceb02042a158"/><file name="ideal.png" hash="16ecbed935f5fb896620c1ec60d5fecd"/><file name="mistercash.png" hash="fe437531e8ea3160dd3ce7c22c6d1dd7"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="paypal.png" hash="4d28dd0b563dcffb4192b5fe54a43530"/><file name="paysafecard.png" hash="55a46938a74dbba9f8fa2c63e464ae98"/><file name="wallie.png" hash="643897c26a2ad7be40457bc1faafd591"/><file name="wire.png" hash="6027a80b16b699c299e748fc1f891b03"/></dir><dir name="en"><file name="afterpay.png" hash="a3b02f6f3e53f548d58d2da794f4c900"/><file name="creditcard.png" hash="a1f1758c0ed18c576daddfad4e287dcf"/><file name="ddebit.png" hash="8eaa9ca96554a065bba75f3a3c62c25b"/><file name="directebank.png" hash="ec990be24336501593956872b5a69a0c"/><file name="elv.png" hash="af722d1a80025fbef18faf9baafe91e3"/><file name="giropay.png" hash="abbc084008a2bc4692cee1e014e88e01"/><file name="ideal.png" hash="3ad4441b5e59613b07efad0b4c781812"/><file name="mistercash.png" hash="fe437531e8ea3160dd3ce7c22c6d1dd7"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="paypal.png" hash="db854b8832246666da38130f2d527331"/><file name="paysafecard.png" hash="d9fac94c828b6429641e74f027a6e23d"/><file name="wallie.png" hash="9bbc206f96bfeb2ec82a47d6ecbae4b9"/><file name="wire.png" hash="f602b0978725d2663fe69c93276cace0"/></dir></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="icecore.xml" hash="98b5a6c55a72ba244b21a5815ae0c4fc"/></dir><dir name="template"><dir name="icepaycore"><file name="grid_modules.phtml" hash="a386ca826b2386094d54cce23fb90170"/></dir><dir name="icepayadvanced"><file name="grid_paymentmethods.phtml" hash="8bf6b91fd7438ffa1d64ee1f96dc0766"/><file name="paymentmethod.phtml" hash="ad3f14775491b77a69c9943eb6a767a5"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="icecore.xml" hash="96ed3cf67c702affdb8869e1a6c5d980"/></dir><dir name="template"><dir name="icepaycore"><dir><dir name="front"><file name="check.phtml" hash="ae5608fb727b2457af10c7bd9faee6d9"/><file name="statement.phtml" hash="7cc11055297c480e75b6f082c41bdaa6"/></dir></dir></dir><dir name="icepayadvanced"><dir><dir name="form"><file name="default.phtml" hash="fdf9eb2d5c4a5ef8f43f6e9d8090ebd4"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
| 19 |
<compatible/>
|
| 20 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 21 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Icepay_IceAdvanced</name>
|
| 4 |
+
<version>1.1.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>Commercial</license>
|
| 7 |
<channel>community</channel>
|
| 11 |
<description>Enables payments using payment service provider ICEPAY.
|
| 12 |
The Advanced extension includes webservice support
|
| 13 |
This package also contains the Icepay_IceCore extension.</description>
|
| 14 |
+
<notes>- Extended Checkout now correctly uses the adres2 label in combination with adres1 (Afterpay)
|
| 15 |
+
- Extended Checkout XML check is now only done for Afterpay
|
| 16 |
+
- Fixed creating order in back-end bug
|
| 17 |
+
- Added phonenumber check for Extended Checkout for Dutch Countries (Afterpay)
|
| 18 |
+
- Afterpay now requires Tax Calculation Method Based on Unit Price, otherwise will be hidden.
|
| 19 |
+
</notes>
|
| 20 |
<authors><author><name>Olaf Abbenhuis</name><user>Zechiel</user><email>olaf.abbenhuis@icepay.com</email></author><author><name>Wouter van Tilburg</name><user>wvantilburg</user><email>wouter@icepay.eu</email></author></authors>
|
| 21 |
+
<date>2013-02-05</date>
|
| 22 |
+
<time>11:44:44</time>
|
| 23 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Icepay_IceCore.xml" hash="268e777c318f1cd6258a56c3049ac678"/><file name="Icepay_IceAdvanced.xml" hash="069d0a2d2c7a34e366bc2b79483cd2b4"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Icepay_IceCore.csv" hash="e0d67599dc2088767b8ae2b1b601fec8"/><file name="Icepay_IceAdvanced.csv" hash="dd3ba59aeac6ac11d4071bd3529767cd"/></dir><dir name="nl_NL"><file name="Icepay_IceCore.csv" hash="becf356de17d63f4cd237e03b1d704e8"/><file name="Icepay_IceAdvanced.csv" hash="5d1d00bd9add8b1fcb61cd10ee5fa2af"/></dir><dir name="de_DE"><file name="Icepay_IceAdvanced.csv" hash="3cae75009684ac7a1b4afb6667d6a477"/><file name="Icepay_IceCore.csv" hash="e8ad59c02f83d67b31e7bbef3ede043e"/></dir><dir name="es_ES"><file name="Icepay_IceAdvanced.csv" hash="f469c13d48a7361d0346fd29181c8370"/><file name="Icepay_IceCore.csv" hash="fa46bf1feedc31495401dfab9e4232d6"/></dir><dir name="fr_FR"><file name="Icepay_IceAdvanced.csv" hash="66ae26a1d9f20009878f19673d2d67b0"/><file name="Icepay_IceCore.csv" hash="5191576073b592b4285a983cc7fd17dc"/></dir><dir name="it_IT"><file name="Icepay_IceAdvanced.csv" hash="114d8290130a9f090efe210484eff1b9"/><file name="Icepay_IceCore.csv" hash="351fdc02d699cf65d763da8a44479f42"/></dir></target><target name="magecommunity"><dir name="Icepay"><dir name="IceCore"><dir><dir name="Block"><dir name="Adminhtml"><file name="CheckSettings.php" hash="1e37aaa21895b1536895d4b2f2063061"/><file name="GenerateURL.php" hash="1b085eef7e7baff781c814376ab99314"/><dir name="Grid"><file name="Modules.php" hash="10bd64d92a0f0366d6a3ac2a19953725"/></dir><file name="Init.php" hash="0ec5a603fe82b11d7a0a3e7c82265e1a"/></dir><dir name="Front"><file name="Statement.php" hash="85ee089622ff4a3bc15d08f0a2e80813"/><file name="Template.php" hash="06eb31a4a51dc6ee7143d6c8866131d6"/></dir></dir><dir name="Helper"><file name="Data.php" hash="5b1a8ab63b6b4184700507594201a7b7"/></dir><dir name="Model"><file name="Config.php" hash="952b1621e8df054150a357b11f4af177"/><dir name="Icepay"><file name="Postback.php" hash="de72128ef99aa20a4affb5b6c27f9af3"/><file name="Result.php" hash="4bfc63bf6d76d0ddf3045bd855ff9ccc"/><dir name="Webservice"><file name="Api.php" hash="4d2fa70fcdc06117f74c985f573dfcfb"/></dir></dir><dir name="Mysql4"><file name="IceCore.php" hash="d796f09db791d857f257c3ad5ac9e84a"/></dir></dir><dir name="controllers"><file name="AboutController.php" hash="9ca5a652dbf27e57cc7bbcb7ed073e1b"/><file name="CheckController.php" hash="901adc45f9c44fa5b1a11dd36eb025d1"/><file name="IndexController.php" hash="01d74f3579ebf469788ee6e7e41d7b21"/><file name="ProcessingController.php" hash="4cbedbf49193562e9739b0a3d00b3dda"/></dir><dir name="etc"><file name="config.xml" hash="dbb0858972171495ed25b86939d4fc90"/><file name="system.xml" hash="9497988c9b4c53db90c59b57867e9de5"/></dir><dir name="sql"><dir name="icepaycore_setup"><file name="mysql4-install-1.0.0.php" hash="bc37063c45b48e52a7e12584daf82aef"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="b1b1dfd41f1aff682dcf34fb544e922e"/></dir></dir></dir></dir><dir name="IceAdvanced"><dir><dir name="Block"><dir name="Adminhtml"><file name="CheckSettings.php" hash="1e9e08f5414b22dd84557ade567aba48"/><dir name="Grid"><file name="Paymentmethods.php" hash="50c3b5812161ef9831b7d3bd33addf92"/></dir><dir name="Setting"><file name="Paymentmethod.php" hash="dc5548c4bfde0375c3431d8d9972da1f"/></dir></dir><dir name="Payment"><dir name="Form"><file name="Default.php" hash="f96542cd1e5f13f3639ddc93b9c0172c"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="60b95f147e163095e366d9a22a47db13"/></dir><dir name="Model"><dir name="Checkout"><dir name="Placeholder"><file name="Paymentmethod01.php" hash="b825da0ac49ce5fba409116b2a46bf4f"/><file name="Paymentmethod02.php" hash="202eac322f5cd2df65034476d3e87dd5"/><file name="Paymentmethod03.php" hash="1f193436b77bed331837ab64d148c977"/><file name="Paymentmethod04.php" hash="3d4775f70070381a492b7207fce0d606"/><file name="Paymentmethod05.php" hash="16f86a94192131bddd0f078501c277d2"/><file name="Paymentmethod06.php" hash="113c6788b168790700d2baacbdbcb20c"/><file name="Paymentmethod07.php" hash="50635324e7913f864af6a32a65e299bb"/><file name="Paymentmethod08.php" hash="dba0bf1fb39667ff4b94dcea6821d372"/><file name="Paymentmethod09.php" hash="0029e9dcbb989ac4c6ae686b5d2db262"/><file name="Paymentmethod10.php" hash="94ff83c6d23c879f27c958de595bff3b"/><file name="Paymentmethod11.php" hash="4725cefbb4cdc69d12961853b4c00d13"/><file name="Paymentmethod12.php" hash="b82d7e8830a7b22f942496614d84f2ed"/><file name="Paymentmethod13.php" hash="43f18f4948afc2f7613b3ad47baa2577"/><file name="Paymentmethod14.php" hash="a04a63494d6e4df283049abfe35f57f8"/><file name="Paymentmethod15.php" hash="a5d02861c4668c74492b1865d471afdf"/><file name="Paymentmethod16.php" hash="a9d90c5414e27f814aa7b1ff1e212682"/><file name="Paymentmethod17.php" hash="e55127cbf73fecbb8ec66848f300c414"/><file name="Paymentmethod18.php" hash="388c76235c1c35a97ab8893d1f672807"/><file name="Paymentmethod19.php" hash="454f5142fb3e17152c137a052e13294c"/><file name="Paymentmethod20.php" hash="638b60e75678908fc92df8b1469a2500"/></dir><file name="Standard.php" hash="0a4eb475728203d20fab78061ab72bfb"/></dir><dir name="Extensions"><dir name="MW"><file name="GiftWrap.php" hash="b41c1b7e4ee1172e29db922c549c9d7b"/></dir></dir><dir name="Mysql4"><file name="IceAdvanced.php" hash="b41ddf849526fcc38e69c6431c613044"/></dir><file name="Observer.php" hash="0851bd8281ce6962648682ebae8ed00d"/><file name="Pay.php" hash="d6fd7209393c0f9a9e19c8414af04661"/><file name="Webservice.php" hash="a174ae0689c94abfff98b5c7731f9827"/><file name="icepay_api_order.php" hash="98ff23fe65b8d486e10270565db78a45"/></dir><dir name="controllers"><file name="AjaxController.php" hash="5663eb36613923b2ccd9ede56787a0c9"/><file name="ConfigController.php" hash="9be40c50c69981034a9787a1f2e005f1"/><file name="ProcessingController.php" hash="5d77f6080bdd46bf5aa610e5c4db78e1"/></dir><dir name="etc"><file name="config.xml" hash="6254fd841f11b5d3f6fe9e30a20527e3"/><file name="system.xml" hash="d8b509ef49a7037cca8f5215a0551fd3"/></dir><dir name="sql"><dir name="icepayadvanced_setup"><file name="mysql4-install-1.0.0.php" hash="f0b069a3503871e8221dc30441012e56"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="6c771822888f14d9679f6b4ab71719c0"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="icepay"><file name="icepay-logo.png" hash="155f2d4dd137423ccbc3d4037cf46d5f"/><file name="logo-currence.png" hash="fa37b87e496d9955ef455e96251bd434"/><file name="logo-thawte.png" hash="dcf93e2d0631b1e2853ce8380d80c125"/><file name="logo-thuiswinkel.png" hash="4a54a5f4e09988a4b16697fe54a462e7"/><file name="nologo.png" hash="72e977c925c8b6c70ff5fb69c0e054c8"/><dir name="nl"><file name="afterpay.png" hash="b9d37ce8c7daad7939f25d4f3f522d28"/><file name="creditcard.png" hash="1036251ede1a09299feecb75043d6e16"/><file name="ddebit.png" hash="2efd78c91a6558f0e5e71a4cdc6f82e4"/><file name="directebank.png" hash="70c2f9d0c6726b7b4b72b97437ed137b"/><file name="elv.png" hash="cdb571467e6e3f0718887ea5c6e9dc24"/><file name="giropay.png" hash="57167e2c98a48f3a24b1743e74f6158a"/><file name="icepay.png" hash="39a55d71460ccce2b65517ce40d3826a"/><file name="ideal.png" hash="fc18c3e422e4163afee4646623b2569b"/><file name="mistercash.png" hash="84164ec464031eb983cf971c93883291"/><file name="nologo.png" hash="59b4f3e8abf4cd51d1c5ab9f1a425999"/><file name="paypal.png" hash="944b54460b95c4842ce19982264e577d"/><file name="paysafecard.png" hash="23deaae36aa2cb0d7ef1c04804e30145"/><file name="wallie.png" hash="489236d8a7d678f355d6401a1f34dd5b"/><file name="wire.png" hash="63be6b74df1fc107d31e7830756ae39b"/></dir><dir name="en"><file name="afterpay.png" hash="b9d37ce8c7daad7939f25d4f3f522d28"/><file name="creditcard.png" hash="1036251ede1a09299feecb75043d6e16"/><file name="ddebit.png" hash="408f41a0650a204cadb791c3e1b0e1a1"/><file name="directebank.png" hash="65bea681edb8442463b96ca0a6d2f604"/><file name="elv.png" hash="cdb571467e6e3f0718887ea5c6e9dc24"/><file name="giropay.png" hash="57167e2c98a48f3a24b1743e74f6158a"/><file name="icepay.png" hash="39a55d71460ccce2b65517ce40d3826a"/><file name="ideal.png" hash="fc18c3e422e4163afee4646623b2569b"/><file name="mistercash.png" hash="84164ec464031eb983cf971c93883291"/><file name="nologo.png" hash="72e977c925c8b6c70ff5fb69c0e054c8"/><file name="paypal.png" hash="944b54460b95c4842ce19982264e577d"/><file name="paysafecard.png" hash="23deaae36aa2cb0d7ef1c04804e30145"/><file name="wallie.png" hash="489236d8a7d678f355d6401a1f34dd5b"/><file name="wire.png" hash="d61bac01ea81d71bebc03f484b883c12"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="icepay"><file name="admin.css" hash="21126dd9de5b86311f8bd9ff8da82f8f"/><file name="general.css" hash="f2d7fc0cfb170a997892a6a3589cf7fc"/><dir name="images"><file name="icepay-logo.png" hash="584d79128e6df216e9f7304329158b56"/><file name="section-logo.png" hash="5242ece5dd1434831174ef7fba8c2c4a"/><file name="error_msg_icon.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="success_msg_icon.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="button-manual.png" hash="7b708db3c8915897a4e3526389b7e3b2"/><file name="button-movie.png" hash="c164da277349322fcd4480ece39d6e00"/><dir name="nl"><file name="afterpay.png" hash="a3b02f6f3e53f548d58d2da794f4c900"/><file name="creditcard.png" hash="48a101cac247f07311ef3ccf1075092d"/><file name="ddebit.png" hash="89793240543046ce977a11eee9b99368"/><file name="directebank.png" hash="ec990be24336501593956872b5a69a0c"/><file name="elv.png" hash="af722d1a80025fbef18faf9baafe91e3"/><file name="giropay.png" hash="5e167cb8dbe05391b1ecceb02042a158"/><file name="ideal.png" hash="16ecbed935f5fb896620c1ec60d5fecd"/><file name="mistercash.png" hash="fe437531e8ea3160dd3ce7c22c6d1dd7"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="paypal.png" hash="4d28dd0b563dcffb4192b5fe54a43530"/><file name="paysafecard.png" hash="55a46938a74dbba9f8fa2c63e464ae98"/><file name="wallie.png" hash="643897c26a2ad7be40457bc1faafd591"/><file name="wire.png" hash="6027a80b16b699c299e748fc1f891b03"/></dir><dir name="en"><file name="afterpay.png" hash="a3b02f6f3e53f548d58d2da794f4c900"/><file name="creditcard.png" hash="a1f1758c0ed18c576daddfad4e287dcf"/><file name="ddebit.png" hash="8eaa9ca96554a065bba75f3a3c62c25b"/><file name="directebank.png" hash="ec990be24336501593956872b5a69a0c"/><file name="elv.png" hash="af722d1a80025fbef18faf9baafe91e3"/><file name="giropay.png" hash="abbc084008a2bc4692cee1e014e88e01"/><file name="ideal.png" hash="3ad4441b5e59613b07efad0b4c781812"/><file name="mistercash.png" hash="fe437531e8ea3160dd3ce7c22c6d1dd7"/><file name="nologo.png" hash="57404bbcfb3e5a70239d3085e14471cc"/><file name="paypal.png" hash="db854b8832246666da38130f2d527331"/><file name="paysafecard.png" hash="d9fac94c828b6429641e74f027a6e23d"/><file name="wallie.png" hash="9bbc206f96bfeb2ec82a47d6ecbae4b9"/><file name="wire.png" hash="f602b0978725d2663fe69c93276cace0"/></dir></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="icecore.xml" hash="98b5a6c55a72ba244b21a5815ae0c4fc"/></dir><dir name="template"><dir name="icepaycore"><file name="grid_modules.phtml" hash="a386ca826b2386094d54cce23fb90170"/></dir><dir name="icepayadvanced"><file name="grid_paymentmethods.phtml" hash="8bf6b91fd7438ffa1d64ee1f96dc0766"/><file name="paymentmethod.phtml" hash="ad3f14775491b77a69c9943eb6a767a5"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="icecore.xml" hash="96ed3cf67c702affdb8869e1a6c5d980"/></dir><dir name="template"><dir name="icepaycore"><dir><dir name="front"><file name="check.phtml" hash="ae5608fb727b2457af10c7bd9faee6d9"/><file name="statement.phtml" hash="7cc11055297c480e75b6f082c41bdaa6"/></dir></dir></dir><dir name="icepayadvanced"><dir><dir name="form"><file name="default.phtml" hash="fdf9eb2d5c4a5ef8f43f6e9d8090ebd4"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
| 24 |
<compatible/>
|
| 25 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 26 |
</package>
|
