paytrail/paytrail-for-adobe-commerce
Composer 安装命令:
composer require paytrail/paytrail-for-adobe-commerce
包简介
Paytrail is a payment gateway that offers 20+ payment methods for Finnish customers.
README 文档
README
Paytrail payment service for Adobe Commerce (formerly known as Magento 2)
WARNING: This module is not compatible with Markup/Paytrail module. Using both modules will cause errors.
Always perform a backup of your database and source code before installing any extensions.
This module has been tested on Adobe Commerce / Magento 2.4.7, 2.4.6, 2.4.5, 2.4.4 and 2.3.X {community|commerce} versions. Support for 2.2.X has ended and compatibility with older versions cannot be guaranteed.
Adobe Commerce system requirements per tested version can be found here.
Features
This payment module has the following features:
- Payment methods provided by Paytrail payment service
- The ability to restore and ship a cancelled order
- Support for delayed payments (Collector etc.)
- Support for multiple stores within a single Magento 2 instance
- Recurring Payments
Installation
The module only supports installation via composer.
Steps:
- Make sure that you have Magento file system owner rights.
- Navigate to your Adobe Commerce root folder on the command line and enter:
composer require paytrail/paytrail-for-adobe-commerce:<latest_version> --no-update - If your credentials are asked, enter your Adobe Commerce marketplace access keys.
- Enter command:
composer update paytrail/paytrail-for-adobe-commerce - Run the following commands:
php bin/magento module:enable Paytrail_PaymentService
php bin/magento setup:upgradephp bin/magento setup:di:compilebin/magento setup:static-content:deploy - Navigate to Adobe Commerce admin interface and select Stores -> Store Configuration -> Sales -> Payment Methods -> Paytrail for Adobe Commerce
- Enter your credentials and enable the module (Test credentials)
- Clear the cache
Usage
The module settings can be found from: Stores -> Configuration -> Sales -> Payment Methods -> Paytrail for Adobe Commerce
The module has the following settings:
- Enable: Defines whether the payment method is enabled or not (Input: Yes / No)
- Payment method selection on a separate page: Display payment method selection on a separate page (Input: Yes / No)
- Merchant ID: Your Paytrail merchant ID (Input: Text)
- Merchant Secret: Your Paytrail merchant secret (Input: Secret)
- New Order Status: A custom status for a new order paid for with Paytrail (Input: Selection)
- Email Address For Notifications: If a payment has been processed after the order has been cancelled, a notification will be sent to the merchant so that they can reactivate and ship the order (Input: Email address)
- Payment from Applicable Countries: Allow payments from all countries or specific countries (Input: All / Specific)
- Payment from Specific Countries: If the previous setting has been set to specific countries, this list can define the allowed countries (Input: Selection)
Setting up Recurring Payments
The module now supports recurring payments. Please refer to the full instructions on Recurring Payments to set it up.
Refunds
This payment module supports online refunds.
Steps:
- Navigate to Sales -> Orders and select the order you need to fully or partially refund
- Select Invoices from Order View side bar
- Select the invoice
- Select Credit Memo
- Define the items you want to refund and optionally define an adjustment fee
- Click Refund
Canceled order payment email notification
If the customer closes the browser window right after completing the payment BUT before returning to the store, Adobe Commerce is left with a “Pending payment” status for the order. This status has a timeout, so if the payment confirmation does not arrive within 8 hours of the purchase, Adobe Commerce automatically cancels the order. Paytrail informs Adobe Commerce of a payment that has gone through, but it may take over 8 hours.
When the confirmation is finally made, Adobe Commerce registers the transaction to the order and changes the order status to Processing. But since the stock may have changed in the interim, the items are still cancelled. The merchant will receive an email informing about the payment that has gone through, but they have to manually go to said order, make sure the items are still available, and click “Restore order” to be able to ship it.
Adjust the timeout
The timeout period of 8 hours can be adjusted in Adobe Commerce configuration. A longer period may allow for Paytrail to confirm the order before it gets canceled, but it also reserves the stock for that exact time.
- Go to Stores -> Configuration -> Sales -> Sales -> Orders Cron Settings
- Adjust the Pending Payment Order Lifetime (minutes) value to your liking.
Order status
Pending Payment
Assigned to an order when customer is redirected to the payment provider of their choosing.
Pending Paytrail Payment Service
Assigned to an order if Paytrail for Adobe Commerce is still waiting for a confirmation of payment. Applies to invoices, such as Collector.
Processing
Assigned to an order once payment is completed and items are ready for shipping.
Canceled
Assigned to an order if Pending Payment status has been active for over 8 hours.
Available statuses:
- Processing
- Suspected Fraud
- Pending Payment
- Pending Paytrail Payment Service
- Payment Review
- Pending
- On Hold
- Complete
- Closed
- Canceled
Setting up Apple Pay
The payment module supports Apple pay payments.
Steps:
- Enable Apple Pay for your Paytrail Merchant Panel.
- Verify your domain with association file
- Enable Apple Pay in admin panel Stores -> Configuration -> Sales -> Payment Methods -> Apple Pay Configuration
Multiple stores
If you have multiple stores, you can set up the payment module differently depending on the selected store. In configuration settings, there is a selection for Store View.
By changing the Store View, you can define different settings for each store within the Adobe Commerce instance.
Payment page UI
Version 2.2.0 provided new UI for payment page. There is no need to use new UI for payment page, old UI is still available when Enable new UI is set to No, as it is by default.
Enable New UI interface in admin panel Stores -> Configuration -> Sales -> Payment Methods -> Payment Page UI -> Enable new UI
For the new UI, personalisation options are restricted only to highlight selected payment method and hover on payment method.
Data Anonymization
If you want to anonymize data from order that is sent to payment provider, you can enable it in admin panel.
Enable Anonymization Order Data in admin panel Stores -> Configuration -> Sales -> Payment Methods -> Anonymization Order Data -> Enable
Rounding problems with certain providers (Collector)
In some cases, this module might send a so-called "rounding-row" item in the order data, which might result in an error if this value is negative (this has been observed with Collector payment method). This is related to how Adobe Commerce calculates and rounds taxes and how this module compensates for possible mismatches between the total and sum of individual items.
There are three algorithms for tax calculation in Adobe Commerce which can be set in Stores -> Configuration -> Sales -> Tax -> Tax Calculation Method Based On
- Unit Price based
- Row Total based
- Total based
If the described error occurs when the calculation algorithm is Total based, changing it to Unit Price based might result in tax calculation with no mismatches.
Note: Changing the setting does not mean that the Unit Price based algorithm is better than Total or Row Total based, all three can have rounding issues in certain situations that can be resolved by choosing one of the other algorithms. The algorithms end up with the same calculations majority of the time.
Disclaimer: This open source module is provided to help merchants get started with our payment service. However, we do not offer any warranty or guarantee that the module will work as intended and provide limited support for it. Use at your own risk.
paytrail/paytrail-for-adobe-commerce 适用场景与选型建议
paytrail/paytrail-for-adobe-commerce 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 50.23k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 10 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「recurring payment」 「payment gateway」 「magento 2」 「paytrail」 「adobe commerce」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 paytrail/paytrail-for-adobe-commerce 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 paytrail/paytrail-for-adobe-commerce 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 paytrail/paytrail-for-adobe-commerce 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple Laravel 5 service provider for including the Recurly PHP client.
repository php library
Payyo Gateway for the Omnipay payment processing library
Rich payment solutions for zend framework2. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more
Laravel Eloquent RRULE tools
MaxAl Subscriptions is a flexible plans and subscription management system for Laravel, with the required tools to run your SAAS like services efficiently. It's simple architecture, accompanied by powerful underlying to afford solid platform for your business.
统计信息
- 总下载量: 50.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-10-15