Skip to content

Instantly share code, notes, and snippets.

View hanafiah's full-sized avatar
🏠
Working from home

Muhamad Hanafiah Yahya hanafiah

🏠
Working from home
View GitHub Profile
echo $_SERVER['GEOIP_COUNTRY_CODE'];
echo $_SERVER['GEOIP_COUNTRY_NAME'];
@hanafiah
hanafiah / jomniaga-sale-tracking.js
Created August 2, 2013 03:52
Below is the standard SALE integration code. You will need to put this into your thank you page after the invoice is generated, and before payment is made. Please pass the order number or invoice number as the unique tracking value. SALE_AMOUNT - The total amount as per your order / invoice TRACKING_VALUE - The invoice number of the transaction
<script type="text/javascript" src="http://www.jomniaga.com/api/conversion?transtype=SALE&amount=SALE_AMOUNT&tracking=TRACKING_VALUE"></script>
<noscript><img src="http://www.jomniaga.com/api/conversion?transtype=SALE&amount=SALE_AMOUNT&tracking=TRACKING_VALUE" width="1" height="1" border="0" /></noscript>
@hanafiah
hanafiah / jomniaga-sale-tracking
Last active December 20, 2015 13:18
Below is the standard SALE integration code. You will need to put this into your thank you page after the invoice is generated, and before payment is made. Please pass the order number or invoice number as the unique tracking value. SALE_AMOUNT - The total amount as per your order / invoice TRACKING_VALUE - The invoice number of the transaction
<script type="text/javascript" src="http://www.jomniaga.com/api/conversion?transtype=SALE&amount=SALE_AMOUNT&tracking=TRACKING_VALUE"></script>
<noscript><img src="http://www.jomniaga.com/api/conversion?transtype=SALE&amount=SALE_AMOUNT&tracking=TRACKING_VALUE" width="1" height="1" border="0" /></noscript>
@hanafiah
hanafiah / jomniaga-lead-tracking
Last active December 20, 2015 13:18
Below is the standard LEAD integration code. You will need to put this into your thank you page after the lead has confirmed his email address. Please pass the email address as the unique tracking ID for leads. <br/> TRACKING_VALUE - The email address of your lead
<script type="text/javascript" src="http://www.jomniaga.com/api/conversion?transtype=LEAD&tracking=TRACKING_VALUE"></script>
<noscript><img src="http://www.jomniaga.com/api/conversion?transtype=LEAD&tracking=TRACKING_VALUE" width="1" height="1" border="0" /></noscript>
@hanafiah
hanafiah / jomniaga-opencart-confirm.tpl.php
Created August 2, 2013 07:04
Part A . Put this code to catalog/view/theme/default/template/checkout/confirm.tpl
<?php
/**
* Jomniaga Conversion code
*
* Put this file to catalog/view/theme/default/template/checkout/confirm.tpl
* before
* </div>
* <div class="payment"><?php echo $payment; ?></div>
*
*/
@hanafiah
hanafiah / jomniaga-opencart-success.tpl.php
Last active December 20, 2015 13:19
Part B Put this code to catalog/view/theme/default/template/common/success.tpl
<?php
/**
* Jomniaga Conversion code
*
* Put this file to catalog/view/theme/default/template/common/success.tpl
* before
* <?php echo $content_bottom; ?>
*
*/
if(isset($this->session->data['jomniaga'])){
<?php
$destination_url = Array(
0 => 'http://www.google.com',
1 => 'http://www.google.com',
2 => 'http://www.google.com'
);
$split_percentage = Array(
0 => 50,
private $zones = array(
'UM12' => '-12:00',
'UM11' => '-11:00',
'UM10' => '-10:00',
'UM95' => '-9:30',
'UM9' => '-9:00',
'UM8' => '-8:00',
'UM7' => '-7:00',
'UM6' => '-6:00',
'UM5' => '-5:00',
@hanafiah
hanafiah / paypal-ipn-validation.php
Created September 27, 2013 04:02
paypa ipn verification sample code
$post_string = 'cmd=_notify-validate&' . file_get_contents("php://input");
$ch = curl_init(PAYPAL_URL);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1);
@hanafiah
hanafiah / 3rdparty.cookies.php
Created October 22, 2013 03:00
header meta untuk 3rd party cookies
<?php
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');