acceptcrypto/acceptcryptophp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

acceptcrypto/acceptcryptophp

Composer 安装命令:

composer create-project acceptcrypto/acceptcryptophp

包简介

AcceptCryptoPHP is a library by AcceptCrypto to interact with AcceptCrypto Checkout.

README 文档

README

Documentation: https://docs.acceptcryp.to

The PHP library is meant for creating custom checkout forms and verifying a payment in the back-end. It's a good practise to keep verifying the payment till its fully confirmed.

Getting started

You can either install our library using composer composer require acceptcrypto/acceptcryptophp or download the source code directly from GitHub

Integrating

Start checkout process

Add an email address to a payment automatically, to make sure customers use the same email as they did on your website for example. Email address is optional but recommended.

$response = AcceptCrypto::checkout({{TOKEN}}, {{CUSTOMER EMAIL ADDRESS}});

The response will be as followed;

  1. error
    • Boolean, returns if the request has encountered any errors.
  2. message
    • String, only returns after an error has occurred
  3. token
    • String, payment token to be used in our Javascript library or API.
  4. url
    • String, can be redirected to to let the user pay

Create a custom checkout form

This code can be used to create a custom checkout form in the back-end rather than on our dashboard. The background and customer email address are both optional parameters but recommended. The background color will be the AcceptCrypto color #FABD58 by default.

$response = AcceptCrypto::custom({{NAME}}, {{AMOUNT}}, {{CURRENCY}}, {{BACKGROUND}}, {{CUSTOMER EMAIL ADDRESS}}, {{API KEY}});

The response will be as followed;

  1. error
    • Boolean, returns if the request has encountered any errors.
  2. message
    • String, only returns after an error has occurred
  3. token
    • String, payment token to be used in our Javascript library or API.
  4. url
    • String, can be redirected to to let the user pay

Checking payment id

Check if the payment has been successful from the above returned payment id.

$tx = AcceptCrypto::tx({{ID}}, {{API KEY}});

The response will be as followed;

  1. error
    • Boolean, returns if the request has encountered any errors.
  2. message
    • String, only returns after an error has occurred.
  3. paid
    • Boolean, returns if the payment has been paid.
  4. confirmed
    • Boolean, returns if the payment has been fully confirmed.
  5. date
    • Timestamp, returns when the payment was made.

Checking email

Check if the given email address has paid successfully.

$email = AcceptCrypto::email({{EMAIL}}, {{API KEY}});

The response will be as followed;

  1. error
    • Boolean, returns if the request has encountered any errors.
  2. message
    • String, only returns after an error has occurred.
  3. paid
    • Boolean, returns if the payment has been paid.
  4. confirmed
    • Boolean, returns if the payment has been fully confirmed.
  5. lastPaid
    • Timestamp, returns the date when the email has paid last.

统计信息

  • 总下载量: 28
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固