zarinpal-checkout
Version:
Type-safe ZarinPal checkout client for Node.js with modern tooling and backwards-compatible API methods.
18 lines (13 loc) • 444 B
text/typescript
import ZarinpalCheckout from '../src/index';
async function run(): Promise<void> {
const zarinpal = ZarinpalCheckout.create('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', false, 'IRT');
const response = await zarinpal.PaymentRequest({
Amount: 1000,
CallbackURL: 'https://example.com/payment/callback',
Description: 'Order #123',
Email: 'user@example.com',
Mobile: '09120000000'
});
console.log(response);
}
void run();