Skip to content

Instantly share code, notes, and snippets.

openapi: 3.0.0
info:
title: Insurance Company API
version: 1.0.0
description: API for managing insurance plans and policies
servers:
- url: https://postman-api-demos-9683740c5a53.herokuapp.com/api
description: Production Server
@whitej031788
whitej031788 / simple-adyen-dotnet-local-tapi.cs
Created January 13, 2023 11:37
A simple example of making a payment request using Adyen Local Terminal API
using System;
using Adyen.Security;
using Adyen.Service;
using Adyen.Model.Nexo;
using Adyen.Model.Nexo.Message;
using Adyen.HttpClient;
using Newtonsoft.Json;
namespace LocalAdyenTerminalAPI
{
<?php
class ET_Builder_Module_Contact_Form extends ET_Builder_Module_Type_WithSpamProtection {
function init() {
parent::init();
$this->name = esc_html__( 'Contact Form', 'et_builder' );
$this->plural = esc_html__( 'Contact Forms', 'et_builder' );
$this->slug = 'et_pb_contact_form';
@whitej031788
whitej031788 / paddleMailChimp.js
Created February 13, 2020 10:50
Paddle Mailchimp Integration
// We use this for the Mailchimp API calls
const https = require('https');
// Input a Mailchimp API Key here; we just use Basic Auth for Server to Server communication
// https://mailchimp.com/help/about-api-keys/
const mailchimpApiKey = process.env.MAILCHIMP_API_KEY;
// Input your Mailchimp domain controller here
// When logged into Mailchimp, first part of URL in your browser, eg us20.admin.mailchimp.com is us20
const domainController = process.env.MAILCHIMP_DC;
@whitej031788
whitej031788 / PaddleWebhook.py
Created February 13, 2020 10:47
Paddle Webhook Simulator
import requests
import argparse
import urllib.parse
parser = argparse.ArgumentParser(description='Process Paddle Webhooks')
parser.add_argument("-s", default=1067955, type=int, help="An example Paddle Subscription ID")
parser.add_argument("-e", default="test@tester.com", type=str, help="Email of the customer")
parser.add_argument("-q", default=1, type=int, help="Quantity purchased")
parser.add_argument("-j", default="", type=str, help="Sample passthrough data you would send to Paddle checkout")
parser.add_argument("-p", default=574286, type=int, help="An example Paddle Subscription Plan ID")
@whitej031788
whitej031788 / paddle.php
Last active February 2, 2023 13:28
An example payment gateway module to integrate WHMCS with Paddle
<?php
/**
* WHMCS Sample Paddle Payment Gateway Module
* You will need to add this file to the modules/gateways/ folder of your WHMCS installation
* It will send the seller to the Paddle checkout for the amount they have ordered
*
* WHMCS only provide invoice amounts, so in Paddle you just need to setup a single product or
* subscription plan and provide that in the config.
*
* Payment Gateway modules allow you to integrate payment solutions with the