Download the PHP package victorybiz/laravel-crypto-payment-gateway without Composer

On this page you can find all versions of the php package victorybiz/laravel-crypto-payment-gateway. 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 laravel-crypto-payment-gateway

Laravel Crypto Payment Gateway

GoUrl.io Crypto Payment Gateway for Laravel.

Latest Version on Packagist Total Downloads GitHub Actions

preview

Table of Contents


Installation

You can install the package via composer:

Next, you should publish the configuration, migration and asset files using the vendor:publish Artisan command. The configuration, migration and asset files will be placed in your application's config, database/migrations and public/vendor directory respectively:

Requirements

This package is create a laravel wrapper on the GoUrl.io's CryptoAPI Payment Gatway.

Dependencies

The compact and standard box template uses Alpinejs and TailwindCSS. While the gourl-cryptobox-iframe and gourl-cryptobox-boostrap uses assets provided by GoUrl.io. You do not need to install any of the dependencies, the package uses the CDN version of dependencies.

Configuration

You need create the following files;

Define payment routes

Learn more about The Callback Route below.

Define the public key and private keys in environment file

Defined the created payment box's public key and private key for the various coins in your .env file.

Config Options

See the published config/laravel-crypto-payment-gateway.php for available options to customize the payment box like changing logo, box_template, box_template_options and other configuration options.

Usage

Payment Data Submission

The payment data can be submitted in the following ways;

Which ever method data field amount in BTC or amountUSD need to be sent, both cannot be used. And optional data fields userID, orderID (if you want to reference the data to any model in app e.g Product model) and redirect (a url you want to redirect to once payment is received).

Usage with Form Submit
Usage with AJAX Request
Usage with Session Redirect (through controller, Livewire component or anywhere in your application)

You need to ensure you validate your data before sending to the payment gateway

The Callback

When a user has made a payment, the GoUrl.io's server will send payment data using HTTP POST method on your callback url specified in field Callback URL of your crypto payment box.

Callback Controller

Create a PaymentController and call instance of Laravel Crypto Payment Gateway's callback method.

Callback Route

Define the callback route to the created controller, the callback route should be a publicly accessible route with no auth. However, you may also exclude the route from CSRF Protection by adding their URIs to the $except property of the VerifyCsrfToken middleware. If you use Cloudflare & Mod_Security & other CDN services, Click Here to view the GoUrl.io's server IPs you need to add in Whitelist.

IPN (Instant Payment Notification)

Once the GoUrl.io's Cryptobox Class finished processing the received callback behind the scene, then it make a call to a cryptobox_new_payment(...) function which allows you to define your processing after payment. To hook on to this function to handle IPN (Instant payment notification) with your custom processing like sending email notifications and giving value to the user once payment is confirmed, create a static class method. This can be a static class method defined anywhere in your application. Preferably you can just define the static method in the same PaymentController for easy code management.

Then update the published config/laravel-crypto-payment-gateway.php and set value for hook_ipn key to hook IPN (Instant Payment Notification) function to the static class method defined above. config file

Eloquent Model for crypto_payments table

This package provide eloquent model for the crypto_payments.

Advanced Usage

Instance of GoUrl.io PHP Class API (cryptobox.class.php)

This package provide access to instance of the core GoUrl.io's cryptobox.class.php which this package uses under the hood.

Click Here to learn more about GoUrl.io PHP Class API and the available methods.

Resources

The following packages was put together to makeup this seamless package.

Testing

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.


All versions of laravel-crypto-payment-gateway with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0
tecnickcom/tc-lib-barcode Version ^1.15
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 victorybiz/laravel-crypto-payment-gateway contains the following files

Loading the files please wait ....