Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Anderson committed Sep 11, 2023
1 parent 48a0f92 commit d52b70b
Showing 1 changed file with 10 additions and 32 deletions.
42 changes: 10 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/lunar-paypal.jpg?t=1" width="419px" />](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

Expand All @@ -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
Expand All @@ -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!');
<livewire:paypal.payment :cart="$cart"
:returnUrl="route('checkout-success.view')" />
```

where `$cart` is the cart instance and `route('checkout-success.view')` is the route to redirect to after a successful payment.

## Testing

```bash
Expand Down

0 comments on commit d52b70b

Please sign in to comment.