定制 dalenys/php-merchant-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

dalenys/php-merchant-api

Composer 安装命令:

composer require dalenys/php-merchant-api

包简介

Dalenys PHP merchant API

README 文档

README

[Dalenys Merchant API] (http://developer.dalenys.com/)

A simple PHP implementation of the Dalenys payment platform API.

Build Status Latest Stable Version Total Downloads License

Installing

Composer

You can easily install this library by adding the following lines to your composer.json file

{
  "require": {
    "dalenys/php-merchant-api": "2.*"
  }
}

or by using this command line in a terminal at the root of your project

composer require dalenys/php-merchant-api 1.*

Manual install

You can install this library manually by simply cloning it to your project and including scripts/autoload.php

Using

Building a simple payment form

Here is the code sample for implementing a simple 10€ payment form

<?php

define('DALENYS_IDENTIFIER', 'YOUR ACCOUNT IDENTIFIER');
define('DALENYS_PASSWORD', 'YOUR ACCOUNT PASSWORD');

// Just implement DALENYS_IDENTIFIER and DALENYS_PASSWORD as defined
$dalenys = Dalenys_Api_ClientBuilder::buildProductionFormClient(DALENYS_IDENTIFIER, DALENYS_PASSWORD);

echo $dalenys->buildPaymentFormButton(10000, 'order_123', 'user_123456', 'Payment sample');

Payment options

You can specify some additional options to the buildPaymentFormButton method. The most useful options are:

  • CREATEALIAS = yes/no => Ask for the creation of a rebilling alias (allowing one click payments or subscription like payments)
  • 3DSECURE = yes/no => Ask for 3DSECURE authentication
  • CARDFULLNAME => When set the card holder inputs will be filled with specified data

For the full list of options you can read the Dalenys documentation

Sandbox environment

You can easily test your integration with the sandbox environment. This environment will simulate payments without processing any real money move. You just have to use another builder method:

<?php

$dalenys = Dalenys_Api_ClientBuilder::buildSandboxFormClient(DALENYS_IDENTIFIER, DALENYS_PASSWORD);

Transaction edition

You can edit a transaction: capturing or refunding an authorization. You should use the direct link AP:

<?php

$dalenys = Dalenys_Api_ClientBuilder::buildSandboxDirectLinkClient(DALENYS_IDENTIFIER, DALENYS_PASSWORD);

$dalenys->capture('A1234', 'order_42', 'capturing a transaction');

Testing

  • First you have to copy tests/ftests/config.php.dist to tests/ftests/config.php
  • Then run composer tests

If you want to run only the unit or functional test suites:

composer utests or composer ftests

Documentation

dalenys/php-merchant-api 适用场景与选型建议

dalenys/php-merchant-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 223.27k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 04 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「payment」 「psp」 「visa」 「mastercard」 「american express」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dalenys/php-merchant-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dalenys/php-merchant-api 我们能提供哪些服务?
定制开发 / 二次开发

基于 dalenys/php-merchant-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-04-23