From 9ab5403cfa71e448f02093c8f6bd4beae15c1506 Mon Sep 17 00:00:00 2001 From: n4ss1m Date: Sat, 26 Oct 2024 08:18:50 +0100 Subject: [PATCH] making `Getting Started` demo simple --- README.md | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 0ff2c39..616ee97 100644 --- a/README.md +++ b/README.md @@ -59,41 +59,14 @@ try{ */ $chargily = new ChargilyPay($credentials); - /** - * Create a new product - */ - $product = $chargily_pay - ->products() - ->create([ - 'name' => "My product name", - 'description' => "My product description", - ]); - - /** - * Create a price for the product - */ - $price = $chargily_pay->prices() - ->create([ - 'product_id' => $product->getId(), - 'amount' => 2500, - 'currency' => 'dzd', - ]); - /** * Create a new checkout for the priced product */ $checkout = $chargily_pay->checkouts() ->create([ - 'locale' => 'en', - 'description' => 'This description for checkout or product', - 'items' => [ - [ - 'price' => $price->getId(), - 'quantity' => 1, - ], - ], + 'amount' => 2500, + 'currency' => 'dzd', 'success_url' => "https://example.com/success", - 'failure_url' => "https://example.com/failure", ]); /**