Skip to content

Instantly share code, notes, and snippets.

View centerax's full-sized avatar
✈️

Pablo S. Benitez centerax

✈️
View GitHub Profile
@centerax
centerax / test-ccs.txt
Created June 15, 2014 16:52
Sage Payment Solutions TEST credit card numbers
Visa
4111111111111111
MasterCard
5499740000000057
Discover
6011000993026909
Amex
@centerax
centerax / url.txt
Created June 23, 2014 15:54
Alexa Top million Download URL
http://s3.amazonaws.com/alexa-static/top-1m.csv.zip
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Config Github Settings
github_username = "fideloper"
github_repo = "Vaprobash"
github_branch = "1.0.0"
github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}"
# Server Configuration

Keybase proof

I hereby claim:

  • I am centerax on github.
  • I am pablobenitez (https://keybase.io/pablobenitez) on keybase.
  • I have a public key whose fingerprint is 5EC2 3ED6 B194 066C 589B 7B4D 7941 1453 3D33 EF06

To claim this, I am signing this object:

<?php
$data = array(
array('warehouse'=>"wh_en",'sku'=>'ace000','sign'=>'+','stock'=>1),
array('warehouse'=>"1",'sku'=>'ace000','sign'=>'+','stock'=>1),
);
$jsonData = json_encode($data);
@centerax
centerax / Cron.php
Created November 21, 2012 10:36
Cron.php
<?php
class Ebizmarts_SagePayReporting_Model_Cron
{
public function getThirdmanScores($cron)
{
$tblName = Mage::getSingleton('core/resource')->getTableName('sagepayreporting_fraud');
$sagepayOrders = Mage::getResourceModel('sales/order_grid_collection');
@centerax
centerax / State.php
Created November 21, 2012 10:39
Ebizmarts_SagePaysuite_Block_Adminhtml_Sales_Order_Grid_Renderer_State
<?php
class Ebizmarts_SagePaysuite_Block_Adminhtml_Sales_Order_Grid_Renderer_State extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract {
/**
* Renders grid column
*
* @param Varien_Object $row
* @return string
*/
<?php
ini_set('display_errors', 1);
$client = new SoapClient('http://MAGENTO_URL/index.php/api/v2_soap/?wsdl');
$session = $client->login('USERNAME', 'PASSWORD');
$complexFilter = array(
'complex_filter' => array(
<?php
if($this->getParentBlock()->getInfo()->getOrder()->getSagepayInfo() && $this->getParentBlock()->getInfo()->getOrder()->getSagepayInfo()->getTxType() != Ebizmarts_SagePaySuite_Model_Api_Payment::REQUEST_TYPE_AUTHENTICATE){
return;
}
$authorises = $this->getParentBlock()->getAuthorisesCollection();
if($authorises->getSize()):
?>
<div class="grid" id="sagepay-authorises-table">
<?xml version="1.0"?>
<basket>
<item>
<description>Honeycomb Quilted Silk Bed Spread - Blue - Pebble</description>
<productSku>Q-HCOMB/BP</productSku>
<productCode>53521</productCode>
<quantity>1</quantity>
<unitNetAmount>162.50</unitNetAmount>
<unitTaxAmount>32.50</unitTaxAmount>
<unitGrossAmount>195.00</unitGrossAmount>