From d52b70b17df608f67c128bcab03c38b39c39d15c Mon Sep 17 00:00:00 2001 From: Kyle Anderson Date: Mon, 11 Sep 2023 11:11:22 -0400 Subject: [PATCH] update readme --- README.md | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 7848595..7186694 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,11 @@ -# This is my package lunar-paypal +# Lunar PayPal [![Latest Version on Packagist](https://img.shields.io/packagist/v/lancodev/lunar-paypal.svg?style=flat-square)](https://packagist.org/packages/lancodev/lunar-paypal) [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/lancodev/lunar-paypal/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/lancodev/lunar-paypal/actions?query=workflow%3Arun-tests+branch%3Amain) [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/lancodev/lunar-paypal/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/lancodev/lunar-paypal/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/lancodev/lunar-paypal.svg?style=flat-square)](https://packagist.org/packages/lancodev/lunar-paypal) -This is where your description should go. Limit it to a paragraph or two. Consider adding a small example. - -## Support us - -[](https://spatie.be/github-ad-click/lunar-paypal) - -We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us). - -We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards). +A custom PayPal payment driver for the [Lunar](https://lunarphp.io) framework. ## Installation @@ -23,26 +15,6 @@ You can install the package via composer: composer require lancodev/lunar-paypal ``` -You can publish and run the migrations with: - -```bash -php artisan vendor:publish --tag="lunar-paypal-migrations" -php artisan migrate -``` - -You can publish the config file with: - -```bash -php artisan vendor:publish --tag="lunar-paypal-config" -``` - -This is the contents of the published config file: - -```php -return [ -]; -``` - Optionally, you can publish the views using ```bash @@ -51,11 +23,17 @@ php artisan vendor:publish --tag="lunar-paypal-views" ## Usage +The package ships with a checkout component that allows payment via PayPal Express checkout or via on-site credit card payment. + +To add the component to your checkout page, add the following to your checkout page: + ```php -$lunarPaypal = new Lancodev\LunarPaypal(); -echo $lunarPaypal->echoPhrase('Hello, Lancodev!'); + ``` +where `$cart` is the cart instance and `route('checkout-success.view')` is the route to redirect to after a successful payment. + ## Testing ```bash