Skip to content

Commit

Permalink
Merge pull request #60 from bernardarhia/charge-reponse-correction
Browse files Browse the repository at this point in the history
Charge reponse correction
  • Loading branch information
bernardarhia authored Apr 6, 2024
2 parents 21ee8f8 + ef786a3 commit 1a48c2f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-parents-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"paystackly": patch
---

bring back charges response
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"release": "npm run ci && changeset version && changeset publish",
"report": "nyc -r text -r lcov report",
"clean": "rm -rf ./.nyc_output ./node_modules/.cache ./coverage ./dist",
"minify": "for file in dist/*/**.js; do terser $file -o ${file%.js}.js --compress --mangle; done"
"minify": "for file in dist/*/**.js; do terser $file -o ${file%.js}.js --compress --mangle; done",
"add-version": "npx changeset"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
Expand Down
8 changes: 4 additions & 4 deletions src/charge/Charge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,31 @@ export class Charges extends BaseCharges {
}
async chargeWithMobileMoney(
payload: ChargeWithMobileMoneyPayload
): Promise<BaseChargeResponse> {
): Promise<BaseChargeResponse | TransactionResponse> {
return await this.basePostChargeRequest<ChargeWithMobileMoneyPayload>(
this.endpoint,
payload
);
}
async chargeWithBank(
payload: ChargeWithBankPayload
): Promise<BaseChargeResponse> {
): Promise<BaseChargeResponse | TransactionResponse> {
return await this.basePostChargeRequest<ChargeWithBankPayload>(
this.endpoint,
payload
);
}
async chargeWithUssd(
payload: ChargeWithUSSDPayload
): Promise<BaseChargeResponse> {
): Promise<BaseChargeResponse | TransactionResponse> {
return await this.basePostChargeRequest<ChargeWithUSSDPayload>(
this.endpoint,
payload
);
}
async chargeWithCard(
payload: ChargeWithCardPayload
): Promise<BaseChargeResponse> {
): Promise<BaseChargeResponse | TransactionResponse> {
return await this.basePostChargeRequest<ChargeWithCardPayload>(
this.endpoint,
payload
Expand Down

0 comments on commit 1a48c2f

Please sign in to comment.