diff --git a/README.md b/README.md index a83c264..a5d05c5 100755 --- a/README.md +++ b/README.md @@ -7,41 +7,222 @@
-This package allows the developer to interact easily with the [YouCan Pay API](https://pay.youcan.shop/docs). +This package allows the developer to interact easily with the [YouCan Pay API](https://pay.youcan.shop/docs). -## Basic Usage +This documentation is separated in two integrations: **Default Integration** and the **Standalone Integration**. +you have the choice to do one integration or both integrations in your checkout page. +## YouCan Pay SDK Setup +Instructions for adding the YouCan Pay SDK to your PHP Applications. + +### Step 1. Requirements +* YouCan Pay Account. +* Your YouCan Pay `private_key` and `public_key` available in Settings > API Keys. +* Visual Studio Code or Sublime Text or any IDE. +* Website with SSL, required only if you want to use the **default mode** for your payments. +* Composer installed in your development environment. + +### Step 2. Add YouCan Pay SDK +Open your PHP project, add the following. +* Run this command to download and include YouCan Pay PHP SDK in your project. + If you can't install composer, you can manually download the SDK from GitHub `https://github.com/NextmediaMa/youcan-payment-php-sdk/archive/refs/heads/master.zip`. ```bash -composer install youcanpay/payment-sdk +composer require youcanpay/payment-sdk +``` + +### Step 2.1 YouCan Pay: Default Integration +You can make payments directly on your site, with the possibility of choosing the position in the DOM. + +If you choose to use JS integration, you must have an SSL certificate to run in production mode. + +2.1.1: Copy this JS script between `...` +```html + ``` +2.1.2: Choose where you want to display payment information (Full Name, Card Numbers, CCV...), must be placed between the `...` tags. +```html + + +``` + +2.1.3: Add this code just before the end of the `...