Skip to content

Instantly share code, notes, and snippets.

Jean-Christophe Hoelt j3k0

Block or report user

Report or block j3k0

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@j3k0
j3k0 / webhook.purchases.updated.json
Created Oct 22, 2019
Example Fovea.Billing webhook request
View webhook.purchases.updated.json
{
"type": "purchases.updated",
"applicationUsername": "my_username",
"purchases": {
"apple:cc.fovea.purchase.subscription1sx": {
"productId": "apple:cc.fovea.purchase.subscription1sx",
"platform": "apple",
"sandbox": true,
"purchaseId": "apple:1000000573800707",
"purchaseDate": "2019-09-29T14:15:44.000Z",
View GET-v2-customer-purchases.json
{
"applicationUsername":"1E6676C70C123AA18222EF001120CAE1",
"purchases": {
"apple:monthly_subcscription": {
"productId":"apple:monthly_subcscription",
"platform":"apple",
"sandbox":true,
"purchaseId":"apple:1000000532000112",
"purchaseDate":"2019-07-29T17:14:00.000Z",
"expirationDate":"2019-07-29T17:19:00.000Z",
View GET-v2-customer-subscription.json
{
"applicationUsername": "my-username-123456",
"subscription": {
"transactionId": "apple:12309a12",
"platform": "apple",
"sandbox": true,
"productId": "apple:monthly.basic",
"purchasedAt": "2019-06-24T21:52:16.000Z",
"renewedAt": "2019-06-28T01:07:29.000Z",
"expiresAt": "2019-06-28T01:12:29.000Z",
View GET-v2-receipt.json
{
"receiptId": "apple:2700001237189799",
"platform": "apple",
"updatedAt": "2019-07-02T07:25:36.700Z",
"amountsMicros": {
"GBP": 2970000
},
"amountUSD": 3.75,
"numTransactions": 2,
"source": {
View GET-v2-receipts.json
{
"paging": {
"skip": 0,
"limit": 100,
"total": 3
},
"rows": [
{
"receiptId": "apple:1000000012309800",
"platform": "apple",
@j3k0
j3k0 / GET-customers-receipts-200.json
Created Jun 21, 2019
Response from fovea.billing customers receipts API
View GET-customers-receipts-200.json
[{
"type": "android-appstore",
"appName": "test",
"bundleId": "cc.fovea.purchase.demo",
"receipt": {
"orderId": "GPA.3312-8483-xxxx-xxxxx..1",
"packageName": "cc.fovea.purchase.demo",
"productId": "cc.fovea.purchase.subscription1",
"purchaseTime": 1549447850144,
"purchaseState": 0,
@j3k0
j3k0 / index.html
Last active May 30, 2019
Tutorial Cordova In-App Purchase Non-Consumable
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<title>Hello World</title>
</head>
<body>
@j3k0
j3k0 / index.html
Last active Sep 4, 2019
Tutorial Cordova In-App Purchase Consumable
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<title>Hello World</title>
</head>
<body>
@j3k0
j3k0 / mutt2issue.py
Created Nov 6, 2018
mutt script that creates github issues
View mutt2issue.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
## About
# Use the content of an email to create a github issue
#
## Usage
# add this to your .muttrc:
# macro index,pager \ei "<pipe-message>~/path/to/mutt2issue.py<enter>"
#
@j3k0
j3k0 / android-release.sh
Created Oct 15, 2018
Generate an android release build with cordova
View android-release.sh
#!/bin/bash
cd "$(dirname "$0")"
ROOT_DIR="$(pwd)"
FINAL_APK="${FINAL_APK:-$ROOT_DIR/android-release-$(date +%Y%m%d-%H%M).apk}"
KEYSTORE="${KEYSTORE:-$ROOT_DIR/android-release.keystore}"
if test ! -e "$KEYSTORE"; then
echo "ERROR: Keystore file $KEYSTORE not found."
You can’t perform that action at this time.