Skip to content

Instantly share code, notes, and snippets.

View remcotolsma's full-sized avatar
🏢
Working @pronamic

Remco Tolsma remcotolsma

🏢
Working @pronamic
View GitHub Profile
@remcotolsma
remcotolsma / IndexController.php
Last active March 25, 2016 12:29
Magento custom sessions JSONP API.
<?php
class Mct_Wordpress_IndexController extends Mage_Core_Controller_Front_Action {
public function indexAction(){
// JSON
$data = new stdClass();
// CART
/** @var Mage_Checkout_Model_Cart $cart */
@remcotolsma
remcotolsma / response-checkout.txt
Last active March 22, 2016 15:20
Response from HTTP POST request to https://testcheckout.buckaroo.nl/nvp/?op=TransactionRequestSpecification 'brq_services' => 'ideal'
Array
(
[BRQ_APIRESULT] => Success
[BRQ_BASICFIELDS_1_DATATYPE] => String
[BRQ_BASICFIELDS_1_DESCRIPTION] => The currency for the transaction
[BRQ_BASICFIELDS_1_MAXLENGTH] => 3
[BRQ_BASICFIELDS_1_NAME] => Currency
[BRQ_BASICFIELDS_1_REQUIRED] => True
[BRQ_BASICFIELDS_10_DATATYPE] => String
[BRQ_BASICFIELDS_10_DESCRIPTION] => The url in the webshop where the customer should return after the transaction results in an error.
@remcotolsma
remcotolsma / composer.json
Created March 16, 2016 09:09
The Pronamic Manuals plugin allows you to easily add the GitHub manuals to your WordPress website.
{
"name": "remco/pronamic-manuals",
"authors": [
{
"name": "Remco Tolsma",
"email": "[email protected]"
}
],
"require": {
"michelf/php-markdown": "^1.6"
@remcotolsma
remcotolsma / functions.php
Created March 15, 2016 08:22
Pronamic iDEAL payment status redirect URL
<?php
// ...
// @see https://github.com/pronamic/wp-pronamic-ideal/blob/3.9.0/classes/Pronamic/WP/Pay/Plugin.php#L232
$url = home_url( '/' );
$url = apply_filters( 'pronamic_payment_status_redirect_url', $url, $payment );
$url = apply_filters( 'pronamic_payment_status_redirect_url_' . $payment->source, $url, $payment );
// ...
array(92) {
'BRQ_APIRESULT' =>
string(7) "Success"
'BRQ_BASICFIELDS_1_DATATYPE' =>
string(6) "String"
'BRQ_BASICFIELDS_1_DESCRIPTION' =>
string(32) "The currency for the transaction"
'BRQ_BASICFIELDS_1_MAXLENGTH' =>
string(1) "3"
'BRQ_BASICFIELDS_1_NAME' =>
@remcotolsma
remcotolsma / phpcs.log
Created February 23, 2016 08:32
WordPress Coding Standards check Headway Base theme.
This file has been truncated, but you can view the full file.
FILE: /Users/remco/Workspace/wt-headway/footer.php
----------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
2 | ERROR | [ ] You must use "/**" style comments for a file
| | comment (Squiz.Commenting.FileComment.WrongStyle)
3 | ERROR | [x] Inline control structures are not allowed
| | (Generic.ControlStructures.InlineControlStructure.NotAllowed)
3 | ERROR | [x] Expected 1 space after "!"; 0 found
| | (WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter)
@remcotolsma
remcotolsma / index.html
Last active February 11, 2016 10:00
Play HTML5 videos in a row.
<!-- Videos used from http://www.coverr.co/ -->
<video id="test" autoplay src="Acro/WEBM/Acro.webm" type="video/webm" class="fillWidth" controls>
</video>
<script type="text/javascript">
var videoSource = new Array();
videoSource[0] = 'Acro/WEBM/Acro.webm';
@remcotolsma
remcotolsma / sunrise.php
Created January 15, 2016 14:08
Solve WordPress redirect issues
<?php
if ( filter_has_var( INPUT_GET, 'debug' ) ) {
function debug_wp_redirect( $location, $status ) {
debug_print_backtrace();
return $location;
}
add_filter( 'wp_redirect', 'debug_wp_redirect', 1000, 2 );
@remcotolsma
remcotolsma / index.php
Created January 8, 2016 11:24
Get available accommodations from Tommy Booking Support
<?php
define( 'WP_USE_THEMES', false );
require '../wp-blog-header.php';
$api_key = '';
$url = 'https://www.tommybookingsupport.com/api/boeking/get-event-data';
@remcotolsma
remcotolsma / search.sh
Created January 4, 2016 13:30
Search for class in Pronamic iDEAL vendor directories.
grep "ConfigTest" ./vendor/wp-pay-gateways/*/src/ -R