定制 resursbank/ecomphp 二次开发

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

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

resursbank/ecomphp

Composer 安装命令:

composer require resursbank/ecomphp

包简介

Resurs Bank AB ecommerce library for PHP.

README 文档

README

Resurs EComPHP Gateway for Resurs Bank shop flows, with functionality enough to getting started fast. It communicates with the Simplified Flow API for booking payments, Configuration Service and the After Shop Service API for finalizing, crediting and annulments etc. This full version of the gateway communicates with Hosted Payment Flow and Resurs Checkout (supporting both REST and SOAP). A PHP-reference for EComPHP is located at https://test.resurs.com/autodocs/apigen/ecomphp-1.3-develop/, if you want to take a look at our automatically generated documentation.

As EComPHP is continuously developed, you should take a look at our bitbucket repo to keep this information updated. It can be found at https://bitbucket.org/resursbankplugins/resurs-ecomphp

Why are there big jumps in the version numbering?

From time to time, we create unofficial internal hotfixes for which bypasses the regular task creation. We should really consider adding those updates to tasks (by reviewing commits), but sometimes it's also very much about spellchecking and docblock adjustments. They are rarely connected to tasks. The gaps are filled in with "- x.x.x" where the dash stands for "up to this version, those changes has been made".

Regular requirements, dependencies and information

  • EComPHP 1.3 was written for PHP 5.6, but there's no longer any guarantee for it to work in legacy systems. Make sure to upgrade.
  • OpenSSL - or similar. SSL drivers are required for communication with Resurs Bank.
  • curl: php-curl with SSL support (Make sure the above SSL requirement is fulfilled!).
  • php-xml and streams (For the SOAP parts).
  • EComPHP uses NetCURL for "mixed calls" (SOAP vs REST). The packagist component is located here.
  • If you plan to ONLY use Resurs Checkout (checkout only, with no aftershop, callbacks or needs of listing payment methods etc) - there should be no need for SoapClient.

Revoked Releases

  • EComPHP 1.2 has been revoked entirely.
  • EComPHP 1.1 and 1.0 is no longer officially maintained (july 2020).

Testing: Bamboo, github actions and bitbucket pipelines

EComPHP is tested within a few different suites. Due to the lack of "test time", tests are not entirely fulfilled in the Bitbucket Cloud, which is why tests also are executed from other places on commits. Below is a list of those instances.

Verified PHP releases

Take a look at this page if you're unsure which PHP versions that are still supported by the PHP team. As of february 2020, only 7.3 and 7.4 have full support open. 7.2 still do have security patch support, but is on deprecation. All older versions are completely unsupported and should probably get upgrade by you also.

7.3 - 8.0 - Supported, autotests active.
5.6 - 7.2 - SUpported, no autotests, [EOL by PHP](https://www.php.net/supported-versions.php).

Installing

For Ubuntu, you can quickly fetch those with apt-get like below, if your system is missing them:

apt-get install php-curl php-xml php-soap

There might be a slight chance that you also need openssl or similar, as our services runs on https-only (normally openssl are delivered automatically, but sometimes they do not - apt-get install openssl might work in those cases if you have access to the server).

Using composer

composer require resursbank/ecomphp:^1.3

Self deployed packages

If you are planning to deploy a plugin bundled with this package, you can run composer with the parameter --prefer-dist You should also make sure that the repositories that is also downloaded together with this package is cleaned up properly: The .git directories must be removed, or a composer install is required before using it. Such deployment could look like this:

#!/bin/bash
composer clearcache
rm -rf vendor composer.lock
composer install --prefer-dist
find vendor/ -type d -name .git -exec rm -rf {} \; >/dev/null 2>&1
find vendor/ -name .gitignore -exec rm {} \; >/dev/null 2>&1

Getting started

This is a short example of how to get started, but you can take a look at our documentation for details and getting started for real.

<?php
    require_once("vendor/autoload.php");
    $resurs = new \Resursbank\RBEcomPHP\ResursBank($myMerchantUserName, $myMerchantPassword);
    $methods = $resurs->getPaymentMethods();
    print_r($methods);
?>

What this library do and do not

  • If you are used to work with the simplified flow and wish to use Hosted/Checkout, you can stick to the use of the older SimplifiedFlow variables, as this library converts what's missing between the different flows.
  • The EComPHP-library takes care of many things that developers usually miss in their development. Especially the payload handling.
  • Both SOAP and REST is supported, under the condition that there are drivers available for it.

resursbank/ecomphp 适用场景与选型建议

resursbank/ecomphp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 43.27k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 06 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 resursbank/ecomphp 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2017-06-19