diff --git a/paypal-checkout.js b/paypal-checkout.js index ced8d8c..d99ff08 100644 --- a/paypal-checkout.js +++ b/paypal-checkout.js @@ -129,7 +129,7 @@ Product.create = async function _createProduct({ }; Product.list = async function _listProducts() { return await PayPal.request({ - url: "/v1/catalogs/products", + url: "/v1/catalogs/products?page_size=20&total_required=true", json: true, }) .then(must201or200) @@ -210,8 +210,9 @@ Plan.create = async function _createPlan({ }; Plan.list = async function _listPlans() { + // TODO paging return await PayPal.request({ - url: "/v1/billing/plans", + url: "/v1/billing/plans?page_size=20&total_required=true", json: true, }) .then(must201or200) diff --git a/tests/list.js b/tests/list.js index 22a26d9..9473a7a 100644 --- a/tests/list.js +++ b/tests/list.js @@ -14,7 +14,7 @@ let PayPal = require("../"); let { Plan, Product, Subscription } = PayPal; async function test() { - let products = await Plan.list(); + let products = await Product.list(); console.info(); console.info("Products:"); console.info(JSON.stringify(products, null, 2));