shoyim/click

Laravel click api services

dev-main 2024-07-22 07:24 UTC

This package is auto-updated.

Last update: 2024-10-22 07:50:32 UTC


README

Total Downloads Latest Stable Version Latest Unstable Version License

Tip

This library allows you to integrate payment acceptance using "CLICK" payment system into Laravel web applications. For the library to function properly, the user must be connected to Click Merchant using the Shop API scheme. Detailed documentation is available here https://docs.click.uz.

Installation via Composer

composer require shoyim/click dev-main

Publish Configuration

php artisan vendor:publish --provider="Shoyim\Click\Providers\ClickServiceProvider" --tag="config"
# db migration
php artisan migrate

Click configuration

CLICK_ENDPOINT=https://api.click.uz/v2/merchant/
CLICK_MERCHANT_ID=your-merchant-id
CLICK_SERVICE_ID=your-service-id
CLICK_USER_ID=your-user-id
CLICK_SECRET_KEY=your-secret-key

List of the Payments methods

  • on_invoice_creating and on_invoice_created for create invoice
  • on_invoice_checking and on_invoice_checked for check invoice
  • on_canceling and on_canceled for cancel payment
  • on_card_token_creating and on_card_token_created for create card token
  • on_card_token_verifying and on_card_token_verified for verify card token
  • on_card_token_paying and on_card_token_payed for payment via card token
  • on_card_token_deleting and on_card_token_deleted for delete card token
  • on_payment_checking and on_payment_checked for check payment status by merchant_id
  • on_checking_with_merchant_trans_id and on_checked_with_merchant_trans_id for check payment status by merchant_trans_id

If you want check whether the payment user exists, complete this method