ahgood / payme-api-demo

hsbc payme api demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributors Forks Stargazers Issues

PayMe API Demo

Explore the docs »

View Demo · Report Bug · Request Feature

About The Project

PayMe API Flow

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

  1. Get the PayMe API package
  2. Clone this repo
    git clone https://github.com/apphk/payme-api-demo
  3. Rename .env.example to .env and update the variables with your credentials
    CLIENT_ID = ''
    CLIENT_SECRET = ''
    SIGNING_KEY_ID = ''
    SIGNING_KEY = ''
    ...
  4. Install packages
    composer install
  5. 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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

Project team: https://hksay.com

About

hsbc payme api demo


Languages

Language:PHP 94.4%Language:Shell 5.6%