Skip to content

Instantly share code, notes, and snippets.

View thlinux1107's full-sized avatar

Thomas Hagan thlinux1107

View GitHub Profile
@thlinux1107
thlinux1107 / request.cfm
Last active April 23, 2021 13:05
PayaGateway AccountUpdater 2.0 Request - ColdFusion
<cfsilent>
<cfset nonce = Right(ToString(rand("SHA1PRNG")),10)>
<cfset UnixStamp = left(getTickcount(), 10)>
<cfset Myurl = "https://api-cert.sagepayments.com/accountupdater/v1/accountupdater?startDate=2021-04-10&endDate=2021-04-12">
<cfset ToBeHashed = "GET" & "#Myurl#" & "417227771521" & "#nonce#" & "#UnixStamp#">
<cfset strHmac = hmac("#ToBeHashed#","iLzODV5AUsCGWGkr","HMACSHA512")>
<cfset Auth = binaryEncode(binaryDecode(strHmac, "hex"), "base64")>
<cfhttp url="#Myurl#" port="443" method="GET">
<cfhttpparam NAME="clientID" value="W8yvKQ5XbvAn7dUDJeAnaWCEwA4yXEgd" type="header" encoded="no" >
<cfhttpparam NAME="merchantID" value="417227771521" type="header" encoded="no">
@thlinux1107
thlinux1107 / request.js
Last active April 20, 2021 14:17
Paya Gateway - Node.js request
let crypto = require('crypto');
var https = require('follow-redirects').https;
var fs = require('fs');
var merchantId = '173859436515';
var merchantKey = 'P1J2V8P2Q3D8';
var clientId = 'W8yvKQ5XbvAn7dUDJeAnaWCEwA4yXEgd';
var clientSecret = 'iLzODV5AUsCGWGkr';
var host = 'https://api-cert.sagepayments.com';
@thlinux1107
thlinux1107 / main.cs
Created March 8, 2021 20:59
PayaGateway - Direct API - Get Charges - C#
using System;
using System.Security.Cryptography;
using System.IO;
using System.Net;
using System.Text;
namespace PayaGateway_GET_Transactions
{
class MainClass {
@thlinux1107
thlinux1107 / approved.php
Created May 21, 2020 14:54
Paya Connect - PayForm - Sample to demonstrate send_parent_message and display data on parent page as well as sending data to an approved page upon a successful transaction.
<?php
/*----------------------------------------------
Author: SDK Support Group
Company: Paya
Contact: [email protected]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Samples intended for educational use only!!!
!!! Not intended for production !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-----------------------------------------------*/
@thlinux1107
thlinux1107 / index.php
Created May 21, 2020 12:43
Paya Connect - PayForm - Sample to demonstrate send_parent_message and display data on parent page
<?php
/*----------------------------------------------
Author: SDK Support Group
Company: Paya
Contact: [email protected]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Samples intended for educational use only!!!
!!! Not intended for production !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-----------------------------------------------*/
@thlinux1107
thlinux1107 / Main.java
Created May 12, 2020 20:54
Paya Connect - AccountForm - Java sample
// /*----------------------------------------------
// Author: SDK Support Group
// Company: Paya
// Contact: [email protected]
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!! Samples intended for educational use only!!!
// !!! Not intended for production !!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// -----------------------------------------------*/
@thlinux1107
thlinux1107 / Main.java
Created May 12, 2020 20:52
Paya Connect - PayForm - Java sample
// /*----------------------------------------------
// Author: SDK Support Group
// Company: Paya
// Contact: [email protected]
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!! Samples intended for educational use only!!!
// !!! Not intended for production !!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// -----------------------------------------------*/
@thlinux1107
thlinux1107 / index.php
Created May 8, 2020 00:32
Paya Connect - Quick Invoice Sample - PHP
<?php
/*----------------------------------------------
Author: SDK Support Group
Company: Paya
Contact: [email protected]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Samples intended for educational use only!!!
!!! Not intended for production !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@thlinux1107
thlinux1107 / index.php
Created May 7, 2020 23:47
Paya Connect - Hosted Payment Page PHP Sample - includes custom fields
<?php
/*----------------------------------------------
Author: SDK Support Group
Company: Paya
Contact: [email protected]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Samples intended for educational use only!!!
!!! Not intended for production !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-----------------------------------------------*/
@thlinux1107
thlinux1107 / main.py
Created May 5, 2020 20:52
Paya Connect - Router Transactions Endpoint - Credit Card Sale with Cloud EMV Terminal
# Originally provided by CORETECHS
# Sample Updated By: SDK Support, Tech Ops
# Company: Paya, Inc.
# For use with Paya Connect (will not work with Paya Gateway (formerly Sage Exchange))!
# Sample for educational use only - not intended for production.
# If you have any questions regarding the sample or our APIs
# please contact us at [email protected]
import time
import json
import requests