Skip to content

Instantly share code, notes, and snippets.

View matthewarkin's full-sized avatar

Matthew Arkin matthewarkin

View GitHub Profile
<body>
<a href="javascript:function base64toHEX(base64){var raw=atob(base64);var HEX='';for(i=0;i<raw.length;i++){var _hex=raw.charCodeAt(i).toString(16)var current=raw.charCodeAt(i)HEX+=raw.charCodeAt(i)<32||raw.charCodeAt(i)>126?"\\x"+(_hex.length==2?_hex:'0'+_hex).toUpperCase():raw[i]}var tagsToReplace={'<':'&lt;','>':'&gt;'};function replaceTag(tag){return tagsToReplace[tag]||tag}return HEX.replace(/[<>]/g,replaceTag)}regex=/decode64\(\"(.*?)\"\)/g output=[]while(matches=regex.exec(document.body.innerHTML)){document.getElementById('search-query-messages-table').innerHTML=document.getElementById('search-query-messages-table').innerHTML.replace(matches[0],base64toHEX(matches[1]))}">Decode PRLE"</a>
</body>
proration date provided = 1488568488
proration date is just time.now
Returned invoice object:
{
"object": "invoice",
"amount_due": 9636,
"application_fee": null,
"attempt_count": 0,
"attempted": false,
<form class="new_ticket" id="new_ticket" action="/tickets" accept-charset="UTF-8" method="post">
<input name="utf8" type="hidden" value="&#x2713;" />
<fieldset class="form-group">
<label for="ticket_name">Name</label>
<input placeholder="What&#39;s your name" class="form-control input-short" required="required" type="text" name="ticket[name]" id="ticket_name" />
</fieldset>
<fieldset class="form-group">
<label for="ticket_email">Email</label>
<input placeholder="Where can we email you?" class="form-control input-short" required="required" type="email" name="ticket[email]" id="ticket_email" />
@matthewarkin
matthewarkin / tos.md
Last active August 11, 2016 19:48
Commence Terms of Service

#WEBSITE TERMS OF USE ##VERSION 1.0 LAST REVISED ON: 08 – 11 – 2016

The website located at commencepayments.com (the “Site”) is a copyrighted work belonging to Commence Payments, Inc (“Company”, “us”, “our”, and “we”). Certain features of the Site may be subject to additional guidelines, terms, or rules, which will be posted on the Site in connection with such features. All such additional terms, guidelines, and rules are incorporated by reference into these Terms.

THESE TERMS OF USE (THESE “TERMS”) SET FORTH THE LEGALLY BINDING TERMS AND CONDITIONS THAT GOVERN YOUR USE OF THE SITE. BY ACCESSING OR USING THE SITE, YOU ARE ACCEPTING THESE TERMS (ON BEHALF OF YOURSELF OR THE ENTITY THAT YOU REPRESENT), AND YOU REPRESENT AND WARRANT THAT YOU HAVE THE RIGHT, AUTHORITY, AND CAPACITY TO ENTER INTO THESE TERMS (ON BEHALF OF YOURSELF OR THE ENTITY THAT YOU REPRESENT). YOU MAY NOT ACCESS OR USE THE SITE OR ACCEPT THE TERMS IF YOU ARE NOT AT LEAST 18 YEARS OLD. IF YOU DO NOT AGREE WITH ALL OF THE PROVISIONS OF

@matthewarkin
matthewarkin / privacy policy.md
Created August 11, 2016 18:43
Commence Privacy Policy

COMMENCE PAYMENTS, INC

PRIVACY POLICY

Last Updated: 08 – 11 – 2016

This privacy policy (“Policy”) describes how Commence Payments, Inc and its related companies (“Company”) collect, use and share personal information of consumer users of this website, commencepayments.com (the “Site”). This Policy also applies to any of our other websites that post this Policy. This Policy does not apply to websites that post different statements.

WHAT WE COLLECT

We get information about you in a range of ways.

@matthewarkin
matthewarkin / .js
Last active July 4, 2016 06:23 — forked from farhan-syed/.js
stripe.charges.createRefund(
req.params.chargeId,
{refund_application_fee: true},
{stripe_account: req.params.stripeConnectedAccount},
function(err, refund) {
if (err) {
res.error(err);
console.log(err);
}
<html>
<input type="file" id='fileForm' >
<input type="submit"onclick="submitForm()">
<script>
submitForm = function(){
var formData = new FormData();
formData.append('purpose', 'identity_document');
formData.append("file", document.getElementById("fileForm").files[0]);
fetch("https://uploads.stripe.com/v1/files", {
method: 'POST',
<p id="time">
</p>
<script>
document.getElementById("time").innerHTML = new Date();
</script>
<?
include('library/init.php');
\Stripe\Stripe::setApiKey("sk_test_xxxxxxx");
$dp = \Stripe\Dispute::retrieve("dp_xxxxxxxxx");
$dp->evidence["customer_name"]="email@example.com";
$dp->evidence["shipping_date"] = "2016-03-06";
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Checkout</title>
</head>
<body>
<article id="store">