Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
錯誤物件
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本參考資料說明可用於網站的 Google Pay API 錯誤物件選項。錯誤物件是用戶端 JavaScript 方法的遭拒 promise 所傳回的物件。
PaymentsError
這個物件包含有關用戶端 JavaScript 方法所傳回的錯誤詳細資料。錯誤可能不會顯示在向使用者顯示的對話方塊中。
| 屬性 |
類型 |
說明 |
statusCode |
字串 |
說明錯誤類型的短碼。 |
statusMessage |
string |
向開發人員顯示的訊息,其中說明遇到的錯誤和可能的修正步驟。 |
常見錯誤
這個物件顯示您可能會在所有 JavaScript 方法中遇到的錯誤。請務必查看 Google Play 管理中心,瞭解其他錯誤訊息。
| 狀態碼 |
說明 |
BUYER_ACCOUNT_ERROR |
目前 Google 使用者無法提供付款資訊。 |
DEVELOPER_ERROR |
已傳送的參數格式不正確。
在所有設定的環境中,瀏覽器主控台都可能會顯示一則錯誤訊息。 |
MERCHANT_ACCOUNT_ERROR |
存取 Google Pay API 的網站沒有適當權限。這可能是因為設定不正確,或在要求中設定了錯誤的商家 ID。詳情請查看 statusMessage 欄位。如果繼續發生這個問題,請與支援小組聯絡。 |
INTERNAL_ERROR |
一般伺服器錯誤。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-11-29 (世界標準時間)。
[null,null,["上次更新時間:2025-11-29 (世界標準時間)。"],[],["The provided content outlines Google Pay API error objects and related components for website integration. `PaymentsError` objects, returned from rejected promises, detail errors with `statusCode` and `statusMessage`. Common error codes include `BUYER_ACCOUNT_ERROR`, `DEVELOPER_ERROR`, `MERCHANT_ACCOUNT_ERROR`, and `INTERNAL_ERROR`, indicating issues with user accounts, parameter formatting, merchant permissions, and general server malfunctions, respectively. The document also references request and response objects, each with specific structures, described in separate pages.\n"]]