Skip to content

Commit

Permalink
feat: shopeepay
Browse files Browse the repository at this point in the history
  • Loading branch information
maythiwat committed Aug 7, 2023
1 parent 318ea3e commit c8415a6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Still WIP, but contributions are welcome!
By default the library will tries to parse data from HTML page returned from GB Prime Pay API and will give you a direct link (vary by channel), but you can revert this by set argument `raw` as `true`

- `LINEPAY` will returns Rabbit LINE Pay Checkout URL Page
- `SHOPEEPAY` will returns ShopeePay Checkout URL Page
- `TRUEWALLET` will returns `ptx_id` for requesting OTP with `truemoney_sendOtp()` or `truemoney_resendOtp()` then submit using `truemoney_submitOtp()`
- `MOBILE_BANKING` vary by Bank Code
- `014` will returns SCB EASY App Deeplink `scbeasy://`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gbprimepay",
"version": "0.2.0",
"version": "0.3.0",
"description": "Unofficial Node.js Library for GB Prime Pay",
"repository": "https://github.com/maythiwat/node-gbprimepay",
"author": "Maythiwat Chomchuen <maythiwat.chom@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/GBPrimePay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class GBPrimePay {
)

if (!this.raw) {
if (channel == 'LINEPAY') {
if (['LINEPAY', 'SHOPEEPAY'].includes(channel)) {
return r.request.res.responseUrl
}

Expand Down
3 changes: 2 additions & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,5 @@ export type GBPrimePayOptions<T> =

export type GBPrimePayResponse<T> =
T extends GBPrimePayChannels.QR_CASH ? GBPrimePayQrCashResponse :
T extends GBPrimePayChannels.LINEPAY ? string : any
T extends GBPrimePayChannels.LINEPAY ? string :
T extends GBPrimePayChannels.SHOPEEPAY ? string : any

0 comments on commit c8415a6

Please sign in to comment.