mirror of
https://github.com/apphk/payme-api-demo.git
synced 2025-04-02 09:00:44 +00:00
hsbc payme api demo
.env.example | ||
.gitignore | ||
composer.json | ||
example.php | ||
README.MD |
PayMe API Demo
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
About The Project
Built With
Getting Started
Prerequisites
Get your PayMe business account ready and Receive your API credentials
- API Credentials consist of 4 parameters
Client ID Secret Key Signing Key ID Signing Key
Installation
- Get the PayMe API package
- Clone this repo
git clone https://github.com/apphk/payme-api-demo
- Rename .env.example to .env and update the variables with your credentials
CLIENT_ID = '' CLIENT_SECRET = '' SIGNING_KEY_ID = '' SIGNING_KEY = '' ...
- Install packages
composer install
- Run example.php
php example.php
Usage
- Init api client
$client = new ApiClient($clientId, $clientSecret, $signingKeyId, $signingKey, $apiUrl);
- Send payment request
$response = $client->payment()->requests($request);
- Get payment request status
$response = $client->payment()->status($paymentRequestId);
- Cancel payment request
$response = $client->payment()->cancel($paymentRequestId);
- Transactions
$response = $client->payment()->transactions();
- Get transaction by id
$response = $client->payment()->transaction($transactionId);
- Refunds
$response = $client->payment()->refunds($transactionId, $refundsRequest);
For more api details, please refer to the Documentation
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Contact
Project team: https://hksay.com