UNPKG

paystack-sdk

Version:
33 lines (32 loc) 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Charge = void 0; class Charge { constructor(http) { this.http = http; } async create(data) { return await this.http.post('/charge', JSON.stringify(data)); } async submitPIN(data) { return await this.http.post('/charge/submit_pin', JSON.stringify(data)); } async submitOTP(data) { return await this.http.post('/charge/submit_otp', JSON.stringify(data)); } async submitPhone(data) { return await this.http.post('/charge/submit_phone', JSON.stringify(data)); } async submitBirthday(data) { return await this.http.post('/charge/submit_birthday', JSON.stringify(data)); } async submitAddress(data) { return await this.http.post('/charge/submit_address', JSON.stringify(data)); } async checkPending(reference) { return await this.http.get('/charge/submit_address', { params: { reference }, }); } } exports.Charge = Charge;