Crypto utilities for Sipay payment provider including hash key creation and verification
// Source: https://github.com/czaydev/better-payment | License: MIT | Copyright 2025-2026 Furkan Özay
// Provided via justclaw.it.com; keep this notice with the code.
import {
aesCbcDecrypt,
aesCbcEncrypt,
base64ToBytes,
digest,
randomHex,
toBase64,
toHex,
} from '../../core/crypto';
import { ValidationError } from '../../core/errors';
import { formatDecimal, toMinorUnits } from '../../core/utils';
import { PaymentStatus, type BasketItem } from '../../types';
import type { SipayVerifiedHash } from './types';
/**
* Sipay endpoints, relative to the provider base URL
*/
export const SIPAY_ENDPOINTS = {
TOKEN: '/ccpayment/api/token',
PAY_2D: '/ccpayment/api/paySmart2D',
PAY_3D: '/ccpayment/api/paySmart3D',
CHECK_STATUS: '/ccpayment/api/checkstatus',
REFUND: '/ccpayme
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key