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
//Working Code | |
try { | |
$customer = \Stripe\Customer::create(array( | |
"description"=>"Customer", | |
"source" => $token, | |
"email" => $email, | |
"plan" => "armorax" | |
) | |
); | |
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 | |
require_once('vendor/autoload.php'); | |
define('STRIPE_KEY_PUBLISHABLE', 'pk_test_XXX'); | |
define('STRIPE_KEY_SECRET', 'sk_test_XXX'); | |
\Stripe\Stripe::setApiKey(STRIPE_KEY_SECRET); |
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 | |
/********************************************************************************/ | |
/*** Wordpress Ajax code to perform any Function using Ajax Easily***/ | |
/********************************************************************************/ | |
add_action( 'wp_footer', 'my_action_javascript' ); | |
function my_action_javascript() { ?> | |
<script type="text/javascript" > | |
/* Make this document ready function to work on click where you want */ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Stripe Sample Form</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script> | |
<script type="text/javascript" src="https://js.stripe.com/v1/"></script> | |
<script type="text/javascript"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Stripe Sample Form</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script> | |
<script type="text/javascript" src="https://js.stripe.com/v1/"></script> | |
<script type="text/javascript"> |
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
// Copy & paste below code in browser console. | |
function urlExists(url, callback) { | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState === 4) { | |
callback(xhr.status < 400); | |
} | |
}; | |
xhr.open('HEAD', url); | |
xhr.send(); |
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
/* | |
* A quick snippedt to find plugin and plugin versions in Wordpress | |
* To User this, open Wordpress Plugins page. | |
* Go to inspect element and click on console. | |
* Copy and paste below code and press enter. | |
* Now you will have a list of all plugins at the end of the page. | |
*/ | |
jQuery('.wp-list-table.plugins tbody tr:not(".plugin-update-tr")').each(function(){ | |
var name = jQuery('td.plugin-title strong', this).html(); |