Download the PHP package crypto-pay/binancepay without Composer

On this page you can find all versions of the php package crypto-pay/binancepay. 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 binancepay

Binance Pay API

Binance Pay API for Laravel

Binance Pay API for PHP and Laravel - This is a simple and quick package on how to initiate crypto payments using the Official Binance API. You can use this to initiate ecommerce payments or any other payments of your choose from your website.

Binance Pay API

To authenticate requests in the Binance Pay API, API keys are used. You can view and manage your API keys in the Binance Merchant Admin Portal.

Since API keys carry numerous privileges, it is essential to keep them secure. Avoid sharing your secret API keys in publicly accessible places like GitHub, client-side code, and similar locations.

It is mandatory to make all API requests over HTTPS. Calls made over plain HTTP will not succeed. Also, requests without authentication will fail.

Installation

You can install the package via composer:

Get API Credentials

Binance uses the Binance Pay API keys to authenticate API requests. You can view and manage your API keys in the Binance Merchant Admin Portal.

Go to: Developers → Settings → API Keys → Generate API Key

Read more...

Configurations

Base Url

Create Order API

You can use the “Create Order” API to initiate an order. You will receive a checkoutURL in the API response. Redirect users to the checkoutURL and they can complete the payment on our Binance hosted checkout page.

Endpoint

Request Example

For full API specification, please go to API Request Reference.

Response Example

USAGE

Query Order

You can use the "Query Order" API to query an order and check the order status in real time.

Endpoint

Request Example

For full API specification, please go to API Request Reference.

Response Example

For full API specification, please go to API Request Reference.

You can monitor the payment status using the parameter "status".

Status Description
INITIAL The transaction has been initiated. Return this status after calling Create Order API successfully.
PENDING The transaction is pending for payment.
PAID The transaction has been paid.
CANCELED The transaction has been closed by you with the close order API.
ERROR There is an error occurred during the transaction.
REFUNDING The transaction is under a refund process.
REFUNDED The transaction is under a refund process.
EXPIRED The transaction is expired. By default, the QR code will expire after 1 hour.

USAGE

Return & Cancel URL

Binance Pay: Webhooks

Binance uses webhooks to notify you when something happens. We will automatically send you a notification immediately to keep you up-to-date on your order status.

You will be able to configure webhook endpoints via the Merchant Management Platform.

Setting up Webhooks

For security purposes, Binance will add a signature for webhook notification. Merchants need to verify the signature using the public key issued from Binance Pay.

How it works

  1. Configure the webhook endpoints in the Merchant Management Platform (MMP).

  2. Build the payload and verify the signature on your application. Please note that the certificate endpoint is fixed.

  3. Identify the events you want to be notified of.

  4. Get notified automatically on your order status.

  5. After receiving the notification, please acknowledge it by returning a HTTP 200 and “SUCCESS” in the response body.

Read the official documentation for more details.

Callback Webhook Endpoints

Binance Pay will send order events with final status to partner for notification. You will be able to configure webhook endpoints via the Binance Merchant Admin Portal.

If you set the WEBHOOK_ENDPOINT in the .env, it will override the default webhook endpoint in the Merchant admin portal.

Result of the orders that are close will be notified to you through this webhook with bizStatus = PAY_CLOSED

In situation where event was failed to send, the webhook will retry up to 6 times to resend the event.

Verify Signatures PHP

Build the payload

Decode the Signature with Base64

Verify the content with public key

Query Certificate

Merchants can use the “query certificate” API to obtain the public key and Hash Key.

End Point

Response Parameters

Attributes Type Required Description
certSerial string Y public key hash value
certPublic string Y public key

Binance Pay: Order Notification

Payload Example

You can either use “merchantTradeNo” or “prepayId” to search for a specific order. Please input at least one of them.

To ensure that your server has received and accepted the notifications, please acknowledge every notification with a HTTP 200 and SUCCESS response in the body.

Response Example

Please ensure to send the appropriate response indicating a successful request. In case your process is successful but you fail to inform Binance Pay, it will continue to send notifications up to six times. However, if the process fails, send returnCode as "FAIL," and Binance Pay will attempt to retry the operation.

Orders with no payment activity over 24 hours will be closed automatically, please contact Binance Merchant Operation (https://merchant.binance.com/en/help) in order to get the notification.

USAGE

Finally

If you have any questions or feedback, please feel free to let us know by opening an issue. We value your thoughts and suggestions, and encourage you to contribute to the project by submitting a pull request.

Upcoming Developments 😶‍🌫️👹

C2B - Customer to Business

C2C - Customer to Customer

Binance Pay Official Documentation

https://merchant.binance.com/en/docs/home
https://developers.binance.com/docs/binance-pay/introduction

Contribution Guidelines

Thank you for considering contributing to our Laravel package! We welcome all contributions and appreciate your time and effort in making this package better.

Reporting Bugs

If you have encountered a bug or an issue with the package, please open a new issue on the GitHub repository with a clear and concise description of the problem, steps to reproduce it, and any relevant error messages or logs. Screenshots or code snippets that demonstrate the problem can also be helpful.

Making Changes

If you would like to make changes to the package, please fork the repository and create a new branch for your changes. Before starting any work, please check the open issues and pull requests to make sure that someone else hasn't already addressed the issue or made similar changes.

Once you have made your changes, please create a pull request with a clear description of the changes, including any relevant code snippets or screenshots. If your changes are related to an open issue, please reference the issue in your pull request description.

Code Standards

We follow the Laravel coding standards and PSR-12 coding style. Please make sure that your changes adhere to these standards.

Testing

We have a test suite for the package, and we require that all changes are covered by tests. Please make sure that your changes have adequate test coverage and that all tests pass.

Code of Conduct

We have a code of conduct that all contributors are expected to follow. Please read the code of conduct before contributing to the package.

Credits

We appreciate all contributions and will give credit to all contributors in the package documentation. If you would like to be credited differently, please let us know in your pull request.

Thank you for your contributions!

Contribution

For any inquiries Email: [email protected]


All versions of binancepay with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0|^8.1|^8.2
ext-curl Version *
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 crypto-pay/binancepay contains the following files

Loading the files please wait ....