Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/md-aamroni/paypal

PayPal API Payment in Laravel
https://github.com/md-aamroni/paypal

paypal paypal-checkout paypal-rest-api

Last synced: 5 days ago
JSON representation

PayPal API Payment in Laravel

Awesome Lists containing this project

README

        

Laravel Logo

### Install
```shell
composer require aamroni/paypal
```

### Config Example
Collect your public and secret keys, and configure as necessary in config/payment.php

```php
'paypal' => [
'client' => env('PAYPAL_CLIENT_KEY'),
'secret' => env('PAYPAL_SECRET_KEY'),
'redirect' => [
'success' => sprintf('%s/paypal/success', env('APP_URL')),
'cancel' => sprintf('%s/paypal/cancel', env('APP_URL')),
],
'currency' => 'USD',
'tax_rate' => 0,
'insurance' => 0,
'additional' => 0,
'shipping' => [
'discount' => 0,
'netPrice' => 0
]
],
```

### Checkout Example
```php
checkout(invoice: $invoice, products: $products, shipping: $shipping, purchase: $purchase);

dd($paypal);
```