Skip to content

Instantly share code, notes, and snippets.

View centerax's full-sized avatar
✈️

Pablo S. Benitez centerax

✈️
View GitHub Profile
<?php
ini_set('error_reporting', E_ERROR | E_PARSE);
ini_set('display_errors', 1);
$baseUrl = "http://www.brou.com.uy";
$data = file_get_contents($baseUrl . "/web/guest/institucional/cotizaciones");
$dom = new DOMDocument;
diff --git a/app/code/local/Ebizmarts/SagePaySuite/Model/Api/Payment.php b/app/code/local/Ebizmarts/SagePaySuite/Model/Api/Payment.php
index 0b191b3..f56efab 100755
--- a/app/code/local/Ebizmarts/SagePaySuite/Model/Api/Payment.php
+++ b/app/code/local/Ebizmarts/SagePaySuite/Model/Api/Payment.php
@@ -62,11 +62,11 @@ class Ebizmarts_SagePaySuite_Model_Api_Payment extends Mage_Payment_Model_Method
/**
* BasketXML related error codes.
- *
- * @var type
@centerax
centerax / Proxy_SagePaySuite
Created June 5, 2013 13:23
workaround when you are behind a proxy
I have added this patch which should fix it
Payment.php
Add at line 1939
if($this->getConfigData('proxy_enabled')) {
$proxy_user_pwd = $this->getConfigData('proxy_user').':'.$this->getConfigData('proxy_pass');
$proxy_host_port = 'http://'.$this->getConfigData('proxy_host').':'.$this->getConfigData('proxy_port');
curl_setopt($curlSession, CURLOPT_PROXYUSERPWD, $usrPwd);
curl_setopt($curlSession, CURLOPT_PROXY, $proxy_host_port);
}
<?php
/**
* API model access for SagePay
*
* @category Ebizmarts
* @package Ebizmarts_SagePaySuite
* @author Ebizmarts <info@ebizmarts.com>
*/
class Ebizmarts_SagePaySuite_Model_Api_Payment extends Mage_Payment_Model_Method_Cc {
<currencies>
<currency type="AFN">
<symbol>Af</symbol>
</currency>
<currency type="ANG">
<symbol>NAf.</symbol>
</currency>
<currency type="AOA">
<symbol>Kz</symbol>
</currency>
<?php
/**
* @see Ebizmarts_SagePaySuite_Block_Paypal_Express_Review
*/
?>
<div class="page-title">
<h1><?php echo $this->__('Review Order') ?></h1>
</div>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
/**
* Sage50 compatible Basket.
*
* @param Mage_Sales_Model_Quote $quote
* @return string Basket as string.
*/
public function getSageBasket($quote) {
$basket = '';
@centerax
centerax / sagePaySuite_Checkout.js
Created August 5, 2013 20:02
PayPal Hosted PRO with Sage Pay Suite - OneStepCheckout
//Before 'if(!this.isSagePay()) {' add
if(this.getPaymentMethod() == "hosted_pro") {
submitOsc($('onestepcheckout-form'), location.href, 'Please wait, processing your order...', SuiteConfig.getConfig('global', 'osc_loading_image'));
window._sagepayprocessingorder = false;
return;
}
<?php
class Ebizmarts_SageOne_Block_Adminhtml_Sales_Order_Creditnote_Note extends Mage_Core_Block_Template {
public function getCreditMemo() {
return Mage::registry('current_creditmemo');
}
/**
#!/usr/bin/php
<?php
/**
* Copyright © 2015 Magento. All rights reserved.
* See https://github.com/magento/magento2/blob/develop/COPYING.txt for license details.
*/
/**
* validate_m2_package.php - a script that checks a given M2 zip package to ensure
* it is structured correctly and has all the required files.