This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.imgURL = function(size) { | |
// remove any current image size then add the new image size | |
return this | |
.replace(/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g, '.') | |
.replace(/\.jpg|\.png|\.gif|\.jpeg/g, function(match) { | |
return '_'+size+match; | |
}) | |
; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? php | |
function orderStatus($data_0, $data_1, $data_2, $data_3, $data_4, $data_5, $data_6, $data_7, $data_8, $data_9) { | |
$payload = 'x_account_id=' . $data_1 . '&x_reference=' . $data_2 . '&x_currency=' . $data_3 . '&x_test=' . $data_4 . '&x_amount=' . $data_5 . '&x_gateway_reference=' . $data_6 . '&x_timestamp=' . $data_7 . '&x_result=' . $data_8 . '&x_signature=' . $data_9; | |
$session = curl_init(); | |
curl_setopt($session, CURLOPT_URL, $data_0); // $putUrl | |
curl_setopt($session, CURLOPT_CONNECTTIMEOUT, 30); | |
curl_setopt($session, CURLOPT_TIMEOUT, 30); | |
curl_setopt($session, CURLOPT_HEADER, true); | |
curl_setopt($session, CURLOPT_RETURNTRANSFER,true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function updateCustomer($api_url, $api_key, $api_pswd, $customer_id, $billing_agreement, $tags_default) { | |
$baseUrl = "https://".$api_key.":".$api_pswd."@".$api_url."/admin/"; | |
$tagsFix = $tags_default . ', 20XX-' . $billing_agreement; | |
//Set up JSON payload | |
$payload = array( | |
"customer" => array( | |
'id' => $customer_id, |