Skip to content

Instantly share code, notes, and snippets.

View davdebcom's full-sized avatar

David de Boer davdebcom

View GitHub Profile
@davdebcom
davdebcom / zapier_paytium.php
Created October 3, 2017 14:29
zapier_paytium.php
<?php
/**
* Paytium Zapier
*
* @package PT/Zapier
* @author David de Boer <david@davdeb.com>
* @license GPL-2.0+
* @link http://www.paytium.nl
*
@davdebcom
davdebcom / get_iban_details.php
Last active October 5, 2017 10:00
get_iban_details.php
//GET API KEY
$settings = Mollie_WC_Plugin::getSettingsHelper();
$test_mode = $settings->isTestModeEnabled();
$api_key = $settings->getApiKey($test_mode);
// SET MOLLIE
$mollie = new Mollie_API_Client;
$mollie->setApiKey( $api_key );
// GET PAYMENT
@davdebcom
davdebcom / ccideal_example_form.html
Last active August 29, 2015 14:25
cciDEAL example form
<form id="idealform" action="index.php?option=com_ccidealplatform&task=bankform" method="post">
<input type="hidden" name="grandtotal" id="grandtotal" value="<?php echo $total; ?>" />
<input type="hidden" name="ordernumber" id="ordernumber" value="<?php echo $ordernumber; ?>"/>
<input type="hidden" name="extn" id="extn" value="<?php echo $extn; ?>"/>
<!-- Optional: set a non-default payment method for this plugin/payment method or use ALL -->
<input type="hidden" name="ideal_paymentmethod" id="ideal_paymentmethod" value="ALL"/>
<!-- Optional: reguster more information to cciDEAL fields -->
<input type="hidden" name="payment_custom" id="payment_custom" value="<?php echo $SubmissionId; ?>"/>
@davdebcom
davdebcom / gist:275c65332ce2cc9828dc
Last active August 29, 2015 14:25
[mollie] Access Mollie API via curl (in terminal)
curl -H "Authorization: OAuth api_key" https://api.mollie.nl/v1/payments
<?php
// Video explanation and instructions in Dutch
// https://www.youtube.com/watch?v=K3zFYxdl1xI
//
// The problem:
// The ING bank only allows CSV exports of your bank statements until 16 months in the past.
// PDF exports can be downloaded for previous months but do not convert well to CSV. Most
// bookkeeping software allows import of CSV's so you don't have to type everything manually.
@davdebcom
davdebcom / Stripe button to Bootstrap 2.3.2 btn.css
Last active August 29, 2015 14:19
convert Stripe button to Bootstrap 2.3.2 btn btn-warning.css
/*
David - 15 April 2015 - ccInvoices 2.0.7
Added override CSS for stripe button
So it looks like Bootstrap btn btn-warning
*/
.stripe-button-el span {
background: none !important;
height: unset !important;
min-height: unset !important;
font-weight: normal !important;
function strip(html)
{
var tmp = document.implementation.createHTMLDocument("New").body;
tmp.innerHTML = html;
return tmp.textContent || tmp.innerText || "";
}
.chillcreations-bootstrap .btn-warning,
.chillcreations-bootstrap .btn-warning:active,
.chillcreations-bootstrap .btn-warning:hover,
.chillcreations-bootstrap .btn-warning:visited,
.chillcreations-bootstrap .btn-warning:focus,
.chillcreations-bootstrap .btn-success,
.chillcreations-bootstrap .btn-success:active,
.chillcreations-bootstrap .btn-success:hover,
.chillcreations-bootstrap .btn-success:visited,
.chillcreations-bootstrap .btn-success:focus,
@davdebcom
davdebcom / invoices.php
Created March 12, 2015 16:16
Updated logo path to be local
$op_val['logo'] = '<img src="/media/com_ccinvoices/logo/'.$conf->logo.'"/>' ;
@davdebcom
davdebcom / sisow.php
Created March 12, 2015 13:04
Select a bank text for Sisow bank dropdown
if ($select === true) {
$output = "<select id=\"sisowbank\" name=\"issuerid\" class=\"bform_select\">";
$output .= "<option selected=\"selected\" disabled=\"disabled\">" . JText::_('ID_MESSAGE4') . "</option>";
}