This file contains hidden or 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
import base64 | |
import hashlib | |
import hmac | |
sig = '' // Signature from the payload header | |
payl = '' // Webhook payload from the body | |
key = '' // API Key provided by organization | |
def is_valid_signature(signature, payload, api_key): | |
signature = base64.urlsafe_b64decode(signature) |
This file contains hidden or 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 | |
// Request URL | |
$url = 'http://www.google.com/'; | |
// HTTP headers | |
$headers = array( | |
//'Content-Type: application/json', | |
//'Accept: application/json', | |
); |
This file contains hidden or 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 get_recurring_date_time($frequecy, $startdate, $enddate) { | |
$start_date = strtotime($startdate); | |
$end_date = strtotime($enddate); | |
$difference = $end_date - $start_date; | |
$days = floor($difference/(60*60*24)); | |
switch ($frequecy) { |
This file contains hidden or 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
$queries = array(); | |
parse_str($_SERVER['QUERY_STRING'], $queries); // GET Query String from URL | |
$result = array_filter($queries); // Filter empty string | |
$keys = array_keys($result); // Separate array key | |
$values = array_values($result); // Separate array value | |
function queryParsing($key, $value) | |
{ | |
return($key." = "."'$value'"); // Build string like username = 'value' | |
} |
This file contains hidden or 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
;################################################### | |
; NOTE | |
;#################################################### | |
; change your curl.ini on /etc/php.d/curl.ini | |
; | |
;This config was only tested on amazon AMI | |
;Please check if /etc/ssl/certs/ca-bundle.crt exists | |
; | |
;If you don't have the ca-bundle root certificate you | |
; can get this in |
This file contains hidden or 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
package com.example.easycheckout; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.view.View; |
This file contains hidden or 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 | |
#Path - Sslwireless/Sslcommerz/Plugin/CsrfValidatorSkip.php | |
namespace Sslwireless\Sslcommerz\Plugin; | |
class CsrfValidatorSkip | |
{ | |
/** | |
* @param \Magento\Framework\App\Request\CsrfValidator $subject | |
* @param \Closure $proceed |