Download the PHP package nikajorjika/bog-payment without Composer

On this page you can find all versions of the php package nikajorjika/bog-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 bog-payment

Deprecated

⚠️ Deprecation Warning

This package is deprecated and will no longer receive updates, bug fixes, or security patches.

🔄 Recommended Alternatives

The package has been moved to a new vendor. To continue receiving updates, please switch to the new package.

❓ What This Means

🚀 Migration Guide

  1. In composer.json, replace "nikajorjika/bog-payment": "^1.0" with "redberryproducts/laravel-bog-payment": "^1.0"
  2. Run composer update
  3. Replace Jorjika\BogPayment\Facades\Pay with RedberryProducts\LaravelBogPayment\Facades\Pay
  4. Replace Jorjika\BogPayment\Facades\Transaction with RedberryProducts\LaravelBogPayment\Facades\Transaction
  5. In your Listener, replace Nikajorjika\BogPayment\Events\TransactionStatusUpdated with RedberryProducts\LaravelBogPayment\Events\TransactionStatusUpdated

❤️ Thank You

BOG Payment Gateway

The BOG Payment package provides seamless integration with the Bank of Georgia's payment gateway, enabling Laravel applications to process payments efficiently.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Demo

You can find a demo project here

Features

Installation

You can install the package via composer:

You can publish the config file with:

Once published, the configuration file will be available at:

Environment Variables

Add the following variables to your .env file to configure the package:

You can find up to date BOG_PUBLIC_KEY in the Bank of Georgia's API documentation.

You can also configure additional environment variables as needed. But this is the minimum that you need to implement.

Usage

Usage Example: Simple Payment Processing

To initiate a payment, use the Pay facade to set the order details and process the transaction:

here's an example of the response:

Save Card During Payment

To save the card during the payment process, you can use the saveCard() method. This method will save the card details for future transactions.

When you want to save card during the payment, you need to do the following:

When you receive the response, you can save the card details in your database, where id is the saved card(parent transaction) id that you would use for later transactions.

Payment with Saved Card

Once you have saved new payment method id in your database, you can initiate payments on saved cards like so:

Functionality above will charge saved card without the user interaction.

Building the payload

Although the package provides a convenient way to initiate payments, you can also build the payment payload manually using the provided traits.

The BuildsPayment trait helps you build the payload for payments quickly by providing the following methods

Here's how you do it:

Set Buyer

You can set the buyer details for the payment by using the setBuyer() method. This method accepts an array of buyer details, including the buyer's full_name, masked_email, and masked_phone.

here's the example of how you can set the buyer details:

Callback Handling

The package handles callback behavior automatically. When a payment is processed, it will send a POST request to your callback URL with the payment details. The package then verifies the request's signature to ensure its authenticity and fires the Nikajorjika\BogPayment\Events\TransactionStatusUpdated event, which contains all relevant payment details.

To utilize this functionality, register an event listener in your application to capture and respond to the transaction status updates as needed.

Example: Registering a Listener for Transaction Status Updates Add the following code to your event listener:

Setting Up the Event Listener

Setting Up the Event Listener To handle transaction status updates efficiently, you need to register an event listener that listens for the TransactionStatusUpdated event triggered by the package.

  1. Generating the Listener Automatically You can generate the event listener using the Artisan command:

    This command will create a listener class at app/Listeners/HandleTransactionStatusUpdate.php, which you can customize to handle the event logic.

This approach provides flexibility by allowing dynamic event registrations at runtime without modifying the EventServiceProvider.

For more details on event handling in Laravel, refer to the official documentation.

Handling Transaction Status

The package provides a convenient way to retrieve the status of a transaction using the Transaction Facade's get() method. This method sends a GET request to the Bank of Georgia payment API to retrieve the transaction status.

Here's how you can use it:

See example of the response Official Documentation

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of bog-payment with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2
guzzlehttp/guzzle Version ^7.9
illuminate/contracts Version ^10.0 || ^11.0
spatie/laravel-package-tools Version ^1.16
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 nikajorjika/bog-payment contains the following files

Loading the files please wait ....