phuongdev89/omnipay-anymoney 问题修复 & 功能扩展

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

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

phuongdev89/omnipay-anymoney

Composer 安装命令:

composer require phuongdev89/omnipay-anymoney

包简介

Any.Money driver for the Omnipay payment processing library

README 文档

README

Any.Money payment processing driver for the Omnipay PHP payment processing library.

Installation

The preferred way to install this library is through composer.

Either run

$ php composer.phar require phuongdev89/omnipay-anymoney "*"

or add

"phuongdev89/omnipay-anymoney": "*"

to the require section of your composer.json file.

Usage

The following gateways are provided by this package:

Init Any.Money

    $gateway = \Omnipay\Omnipay::create(\Omnipay\AnyMoney\Gateway::NAME);
    $gateway->initialize([
        'api_key'  => $API_KEY,
        'merchant' => $MERCHANT,
    ]);

Authentication

Detail: https://docs.any.money/en/auth/

Get Balance

    $balance = $gateway->balance(['curr'=>'USD'])->send();
    if($balance->isSuccessful()){
        var_dump($balance->getResult());
    } else {
        var_dump($balance->getError());
        var_dump($balance->getMessage());
    }

Invoice

Detail: https://docs.any.money/en/invoice/

Create invoice

    $invoice = $gateway->invoice([
        'amount'     => 10,
        'externalid' => '1001',//must be unique each call
        'in_curr'    => 'USD',
    ])->create();
    if($invoice->isSuccessful()){
        var_dump($balance->getRedirectUrl());
        var_dump($balance->getData());
    } else {
        var_dump($balance->getError());
        var_dump($balance->getMessage());
    }

Calc invoice

    $invoice = $gateway->invoice([
        'amount'     => 10,
        'in_curr'    => 'USD',
    ])->calc();
    if($invoice->isSuccessful()){
        var_dump($balance->getResult());
    } else {
        var_dump($balance->getError());
        var_dump($balance->getMessage());
    }

Get invoice

    $invoice = $gateway->invoice([
        'externalid' => '1001',
    ])->get();
    if($invoice->isSuccessful()){
        var_dump($balance->getResult());
    } else {
        var_dump($balance->getError());
        var_dump($balance->getMessage());
    }

For general usage instructions, please see the main Omnipay repository.

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2023-01-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固