Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EdamAme-x committed Jan 19, 2024
1 parent 39a92eb commit 2c52167
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
8 changes: 6 additions & 2 deletions deno_dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
PayPay UnOffical api Rapper Library | Various PayPay operations can be automated, from login to balance transfer and confirmation.
Open Source Software 🎁

<img src="/docs/docs/public/favicon.png" width="200" height="200" alt="icon" />

can call it either **paypax** or **PayPax**.

for Node.js, Deno, Bun (all :) )
Expand Down Expand Up @@ -47,8 +49,9 @@ import { PayPay } from "https://deno.land/x/paypax/mod.ts"
```

## Docs
作者に聞くか
[example](./example) ディレクトリのコードを見てください。
[https://edamame-x.github.io/paypax](https://edamame-x.github.io/paypax/)

[example](./example)

### Error 0番
ライブラリの初期化エラー
Expand All @@ -72,3 +75,4 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md)
Created by [@amex2189](https://ame-x.net)

Python版 元版: [https://github.com/taka-4602/PayPaython](https://github.com/taka-4602/PayPaython)
助言 Disocrd: @developerspartner
20 changes: 20 additions & 0 deletions deno_dist/utils/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@ export function parseCreateLink(result: Anyone): ResponseCreateLink {
}

export function parseGetLink(result: Anyone): ResponseGetLink {
if (!('pendingP2PInfo' in result.payload)) {
return {
success: false,
orderId: '',
orderType: '',
description: '',
imageUrl: '',
amount: 0,
link: '',
isSetPasscode: false,
createdAt: '',
acceptedAt: '',
money_type: '',
sender_name: '',
sender_external_id: '',
photo_url: '',
raw: result,
}
}

return {
success: isSuccess(result),
orderId: result.payload.pendingP2PInfo.orderId,
Expand Down
20 changes: 20 additions & 0 deletions src/utils/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@ export function parseCreateLink(result: Anyone): ResponseCreateLink {
}

export function parseGetLink(result: Anyone): ResponseGetLink {
if (!('pendingP2PInfo' in result.payload)) {
return {
success: false,
orderId: '',
orderType: '',
description: '',
imageUrl: '',
amount: 0,
link: '',
isSetPasscode: false,
createdAt: '',
acceptedAt: '',
money_type: '',
sender_name: '',
sender_external_id: '',
photo_url: '',
raw: result,
}
}

return {
success: isSuccess(result),
orderId: result.payload.pendingP2PInfo.orderId,
Expand Down

0 comments on commit 2c52167

Please sign in to comment.