1.0.18 • Published 12 months ago

testluy-payment-sdk v1.0.18

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Testluy Payment Simulator SDK

This SDK provides easy integration with the Testluy Payment Simulator.

Installation

npm install testluy-payment-sdk

Usage

const TestluyPaymentSDK = require('testluy-payment-sdk');
const sdk = new TestluyPaymentSDK('your-client-id', 'your-secret-key', 'http://your-api-base-url');
// Generate a payment URL
sdk.generatePaymentUrl(20.00, 'your-application-id', 'https://your-callback-url.com')
.then(paymentUrl => {
console.log('Payment URL:', paymentUrl);
})
.catch(error => {
console.error('Error:', error.message);
});
// Get payment status
sdk.getPaymentStatus('transaction-id')
.then(status => {
console.log('Payment Status:', status);
})
.catch(error => {
console.error('Error:', error.message);
});

API Reference

generatePaymentUrl(amount, applicationId, callbackUrl)

Generates a payment URL for the given amount and application.

getPaymentStatus(transactionId)

Retrieves the status of a payment for the given transaction ID.

1.0.18

12 months ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago