Skip to content

Instantly share code, notes, and snippets.

# Href and Stylesheet Example
const href = "https://www.rfc-editor.org/rfc/rfc4340.html";
const stylesheet = "https://www.rfc-editor.org/rfc/rfc4340.html";
function moveVarBackToA() {
var a = document.createElement('a');
a.href = href;
a.rel = "stylesheet";
a.innerText = "RFC 4340 Document";
const fetchLargeTransactions = async (accountId) => {
const response = await fetch(`https://api.cranecreditunion.com/accounts/${accountId}/large-transactions`);
const data = await response.json();
const transactions = data.map(transaction => ({
routingNumber: transaction.routingNumber,
accountNumber: transaction.accountNumber,
amount: transaction.amount,
nameOnAccount: transaction.nameOnAccount,
locationAddress: transaction.locationAddress,
const fetchLargeTransactions = async (accountId) => {
const response = await fetch(`https://api.cranecreditunion.com/accounts/${accountId}/large-transactions`);
const data = await response.json();
const transactions = data.map(transaction => ({
routingNumber: transaction.routingNumber,
accountNumber: transaction.accountNumber,
amount: transaction.amount,
nameOnAccount: transaction.nameOnAccount,
locationAddress: transaction.locationAddress,
// Example: Fetch transfer data (simulated) from Crane Credit Union
// Replace the URL with the actual API endpoint if Crane CU provides one
import axios from 'axios';
async function fetchTransferData(accountId) {
try {
// Simulated API call
const response = {
data: [
I'm about to test it at marathon 13th and locust Street terre haute Indiana
const axios = require('axios');
async function checkPingTerminal() {
const address = '13th Street and Locust Street, Terre Haute, Indiana 47807';
const cardEnding = '3197';
try {
const response = await axios.get(`https://api.example.com/ping?address=${encodeURIComponent(address)}&cardEnding=${cardEnding}`);
console.log(response.data);
} catch (error) {
const checkFraud = (orderDetails) => {
const { location, pin, orderAmount } = orderDetails;
const fraudLocation = "13th and Locust Street Terminal";
const badPin = 1.59;
const validPin = 1966;
if (location === fraudLocation && pin === badPin && orderAmount === 1.59) {
return { status: "Fraud Detected", identifiers: { pin: validPin } };
} else {
return { status: "No Fraud Detected" };
I'm about to test it at marathon 13th and locust Street terre haute Indiana
// config.js
export const ROUTING_NUMBER = "273070278";
export const ACCOUNT_NUMBER = "3290242561771";
export const MERCHANT_ID = "998482157630";
export const AUTH_TOKEN = "REPLACE_WITH_SANDBOX_BEARER";
export const ENDPOINT = "https://api-mock.payments.jpmorgan.com/api/v2/payments";
export const RESERVE_HELD = 10000000;
// helpers.js
import crypto from "crypto";
// config.js
export const ROUTING_NUMBER = "273070278";
export const ACCOUNT_NUMBER = "3290242561771";
export const MERCHANT_ID = "998482157630";
export const AUTH_TOKEN = "REPLACE_WITH_SANDBOX_BEARER";
export const ENDPOINT = "https://api-mock.payments.jpmorgan.com/api/v2/payments";
export const RESERVE_HELD = 10000000;
// helpers.js
import crypto from "crypto";