Skip to content

Instantly share code, notes, and snippets.

View ianleeder's full-sized avatar

Ian Leeder ianleeder

  • Melbourne, Australia
View GitHub Profile
@ianleeder
ianleeder / HostByNameExample.ino
Last active February 8, 2018 09:16
ESP8266 DNS lookup failure example
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#define WIFI_SSID "MySSID"
#define WIFI_KEY "MyKey"
void setup() {
Serial.begin(115200);
delay(500);
Serial.println();
@ianleeder
ianleeder / EwayPaypalTest.aspx
Last active February 26, 2016 05:03
Test for registering and updating stored payment details.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="eWAY.Rapid" %>
<%@ Import Namespace="eWAY.Rapid.Enums" %>
<%@ Import Namespace="eWAY.Rapid.Models" %>
<!DOCTYPE html>
<script runat="server">
private static readonly string ApiKey = "myKey";
<%@ Page Language="C#" %>
<%@ Import Namespace="eWAY.Rapid" %>
<%@ Import Namespace="eWAY.Rapid.Enums" %>
<%@ Import Namespace="eWAY.Rapid.Models" %>
<!DOCTYPE html>
<script runat="server">
private static readonly string ApiKey = "mykey";
private static readonly string ApiPassword = "mypassword";
@ianleeder
ianleeder / eWAYInvoiceDescriptionTest.cs
Last active February 8, 2016 23:46
Test case to show InvoiceDescription (and CurrencyCode) aren't returned for TransactionTypes.Purchase
public static void TestInvoiceDescription()
{
// Register a user
string token = TestRegisterInvoiceDescription();
TestRecurringPaymentInvoiceDescription(token);
}
public static string TestRegisterInvoiceDescription()
{
IRapidClient ewayClient = RapidClientFactory.NewRapidClient(ApiKey, ApiPassword, RapidEndpoint);
@ianleeder
ianleeder / eWayTest.cs
Created November 18, 2015 23:51
Test code to try and generate TokenCustomerIDs.
public static void TestTransaction()
{
IRapidClient ewayClient = RapidClientFactory.NewRapidClient(ApiKey, ApiPassword, RapidEndpoint);
// STEP 1
// Create the transaction with eWAY
Transaction transaction = new Transaction()
{
Customer = new Customer()
{