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
export interface PaddlePassthrough { | |
userId: string; // the id of the user in our supabase database | |
} | |
export enum PaddleSubscriptionStatus { | |
Active = 'active', | |
Trialing = 'trialing', // at the moment we don't support trial phases | |
PastDue = 'past_due', // Payment is pending, we should inform he user that he needs to update his payment method | |
Paused = 'paused', // at the moment we don't support pausing subscriptions | |
Cancelled = 'deleted', |
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 type { NextApiRequest } from 'next'; | |
import crypto from 'crypto'; | |
import * as Serialize from 'php-serialize'; | |
const allowedIpAdresses = [ | |
// Sandbox | |
'34.194.127.46', | |
'54.234.237.108', | |
'3.208.120.145', | |
// Production |
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
FROM ubuntu:focal | |
ARG DEBIAN_FRONTEND=noninteractive | |
ARG TZ=Europe/Vienna | |
# === INSTALL Node.js === | |
RUN apt-get update && \ | |
# Install node16 | |
apt-get install -y curl wget && \ |
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 { Model } from 'objection'; | |
export default class TaxRateModel extends Model { | |
countryCode!: string; | |
stripeId!: string; | |
static tableName = 'tax_rate'; | |
} |
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 {types, getType} from 'mobx-state-tree'; | |
function getValueFromPath(value, valuePath) { | |
if (valuePath) { | |
const path = valuePath.split('.'); | |
let endValue = value; | |
for (const pathItem of path) { | |
endValue = endValue[pathItem]; | |
} | |
return endValue; |