ratepay/shopware5-module
Composer 安装命令:
composer require ratepay/shopware5-module
包简介
Ratepay payment methods for Shopware 5
README 文档
README
============================================
| Module | Ratepay Module for Shopware |
|---|---|
| Shop Version | 5.5.0 - 5.7.x |
| Link | http://www.ratepay.com |
| integration@ratepay.com | |
| Full Documentation | click here |
| Legal Disclaimer | click here |
Installation
via packagist (recommended)
This is only possible if you use the composer setup of shopware
- execute
composer require ratepay/shopware5-modulein your project directory - Log into your Shopware-backend
- Install & configure the module
via Shopware store (or GitHub release download)
- Download the plugin from the Shopware store
- Upload it via the Plugin Manager or put it into the folder
custom/plugins/RpayRatePay - Log into your Shopware-backend
- Install & configure the module
Changelog
please have a look into plugin.xml
Shopware CLI Commands
You can use the Shopware CLI to perform operations on Ratepay orders.
All commands have the same structure:
./bin/console ratepay:<operation> <order> [<orderDetail>] [<qty>]
| Name | Description | required |
|---|---|---|
operation |
one of deliver, return, cancel |
Yes |
order |
the order id, order number or the transaction id of the order |
Yes |
orderDetail |
the detail id or detail number which has to be performed. If not provided, all items of a order will be selected.Use shipping to perform the action on the shipping costs. |
No |
qty |
the quantity which has to be performed. If not provided, the original ordered quantity will be used | No |
example operation deliver
all elements of the order (with the id 125) will be delivered
./bin/console ratepay:deliver 125
example operation return
2 elements with item-number SW0001 of the order (with the transaction-id 54-214XXXXXX2133) will be returned
./bin/console ratepay:return 54-214XXXXXX2133 SW0001 2
example operation cancel
all elements with item-number SW0001 of the order (with the order-number 200012) will be canceled
./bin/console ratepay:cancel 200012 SW0001
Request services
There are a three request services registered in the container:
-
\RpayRatePay\Services\Request\PaymentDeliveryServiceUse this service to do deliveries for order.
-
RpayRatePay\Services\Request\PaymentReturnServiceUse this service to do returns for order.
-
RpayRatePay\Services\Request\PaymentCancelServiceUse this service to do cancellations for order.
Usage of the request services
Get the request service via dependency injection. The id of the service is the classname (symfony 3 style)
perform just a few products
use \RpayRatePay\DTO\BasketPosition;
$orderDetail = [ instance of \Shopware\Models\Order\Detail ]
$order = [ instance of \Shopware\Models\Order ]
$basketPosition = new BasketPosition($productNumber, $qty);
$basketPosition->setOrderDetail($orderDetail);
$basketPositions[] = $basketPosition;
$basketPosition = new BasketPosition($productNumber, $qty);
$basketPosition->setOrderDetail($orderDetail);
$basketPositions[] = $basketPosition;
[...]
$basketPositions[] = new BasketPosition(BasketPosition::SHIPPING_NUMBER, 1);
$requestService->setItems($basketPositions);
$requestService->setOrder($order);
$response = $requestService->doRequest();
If you want to deliver/cancel/return the shipping costs of an order, you need to provide shipping as a string as $productNumber. The $qty must be 1.
You must not call setOrderDetail() on the $basketPosition.
Please note that you always have to call setOrderDetail() if you want to deliver/cancel/return a product or voucher, except the shipping costs.
perform full action
If you want to do a full deliver/cancel/return, just call the following:
$order = [ instance of \Shopware\Models\Order ]
$response = $requestService->doFullAction($order);
(already delivered/returned/canceled items will be ignored.)
Response
you will get an \RatePAY\Model\Response\AbstractResponse or a boolean as response.
If you get an AbstractResponse, just call isSuccessful() to verify if the request was successful.
If you get a boolean with the value true the operation has been registered to in the database, but has not been sent to the gateway.
This will happen, if the order is an installment and there an open (not delivered/canceled) items in the order.
Feature flags
You can enable specific features by setting the flags in the plugin configuration.
*Please note: *You should test each feature very carefully, because they may break your processes in some cases.
Please contact your contact person to make sure that this feature will work in your installation.
Separate the features with a comma and no spaces.
| Flag | Description |
|---|---|
| FEATURE-4465 | The PaymentRequest against the gateway sends all items from the BASKET. The ConfirmationDeliver-Request will send all items from the ORDER. So if there is any extension which will add new line-items during the save of the order, the plugin tries to deliver the items during the ConfirmationDeliver request. This feature compares the items, which are in the order and in the basket. Enabling this means, that items, which are not in the basket (but saved to the order), will not saved as ratepay position and can not be delivered. You should also enable FEATURE-8543 if you have enabled the bidirectionality. |
| FEATURE-8543 | By default, if an ratepay position can not be found during an order status update (bidirectionallity), an exception will be thrown and the order will be not updated. If this flag is enabled, the other positions of the order will be processed (if there any). A warning will be reported to the log file. This flag will also work for single order position update during bidirectionality. |
ratepay/shopware5-module 适用场景与选型建议
ratepay/shopware5-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 10 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 ratepay/shopware5-module 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ratepay/shopware5-module 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-10-21