Download the PHP package minic/lunar-hosted-payment without Composer

On this page you can find all versions of the php package minic/lunar-hosted-payment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lunar-hosted-payment

Lunar Hosted Payment Integration

Introduction

This package provides hosted payment gateway integration for Lunar PHP. It allows you to handle payments seamlessly using payment APIs like Stripe, including creating payment intents and managing transactions.

Features

Minimum requirements

Setting Up Your Stripe Account

To use this package, you need to have a Stripe account properly configured. Follow these steps to set up your Stripe account:

  1. Create a Stripe Account
    If you don't already have a Stripe account, sign up at https://stripe.com.

  2. Obtain API Keys

    • Log in to your Stripe Dashboard.
    • Navigate to the Developers section and select API Keys.
    • Copy your Publishable Key and Secret Key.
  3. Set Up Your Environment Variables
    Add the following keys to your .env file: bash composer require minic/lunar-hosted-payment bash php artisan vendor:publish --tag=hosted-payments-config

Register the Service Provider (if not auto-discovered)

If your Laravel project does not support package auto-discovery, add the service provider manually in config/app.php:

Add your payment provider credentials

Make sure you have the provider credentials set in config/lunar-hosted-payment/payment.php. E.g.:

Lunar payments configuration file

Your lunar payments.php config file should look like this:

Usage

Create a Payment

This method will create a payment session and return the created payment session. You can then redirect the user to the provider's payment page:

Note: The user will be redirected to the provider's payment page for completing the transaction.

Authorize a Payment (create order)

Following the lunarphp's pattern of authorizing the payment you can create the actual order by calling the driver's authorize method. This will return the newly created order id.

Contributing

  1. Fork the repository
  2. Create a new branch (feature/new-payment-driver)
  3. Commit your changes
  4. Push to the branch and submit a Pull Request

License

This package is open-source and available under the MIT license.


All versions of lunar-hosted-payment with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
lunarphp/lunar Version ^1.1.0
stripe/stripe-php Version ^14.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package minic/lunar-hosted-payment contains the following files

Loading the files please wait ....