ZenCart类库payment.php解读实现原理

路径:includes/classes/payment.php
paypal:includes/modules/payment/paypal.php
参考:https://blog.csdn.net/yueyekonglong/category_9655974.html

__construct

Constructor,即构造器

函数 update_status()

Calculate zone matches and flag settings to determine whether this module should display to customers or not.

计算区域匹配并标记设置以确定此模块是否应显示给客户

函数 javascript_validation()

JS validation which does error-checking of data-entry if this module is selected for use (Number, Owner Lengths).

JS验证,如果选择使用此模块,则将对数据输入进行错误检查(数字,所有者长度)

函数 selection()

Display Credit Card Information Submission Fields on the Checkout Payment Page.

在结帐付款页面 Checkout Payment Page 上显示信用卡信息提交字段

函数 pre_confirmation_check()

Evaluates the Credit Card Type for acceptance and the validity of the Credit Card Number & Expiration Date.

评估可接受的信用卡类型,以及信用卡号和有效期的有效性

函数 confirmation()

Display Credit Card Information on the Checkout Confirmation Page.

在结帐确认页面上显示信用卡信息

此函数和提交逻辑没有关系

函数 process_button()

Build the data and actions to process when the "Submit" button is pressed on the order-confirmation screen.
This sends the data to the payment gateway for processing.
(These are hidden fields on the checkout confirmation page)

建立在订单确认屏幕上按下“提交”按钮时要处理的数据和操作
这会将数据发送到支付网关进行处理
(这些是结帐确认页面上的隐藏字段)

函数 before_process()

Store the CC info to the order and process any results that come back from the payment gateway.

将抄送信息存储到订单中,并处理从付款网关返回的所有结果

after_process()

Post-processing activities. Updates the order-status history data with the auth code from the transaction.
Add receipt and transaction id to order-status-history (order comments)

后处理活动,使用交易中的验证码更新订单状态历史记录数据

check()

Check to see whether module is installed.

检查是否安装了模块

install()

Install the payment module and its configuration settings.

安装支付模块及其配置设置

remove()

删除模块及其所有设置

keys()

Internal list of configuration keys used for configuration of the module.

用于配置模块的配置密钥的内部列表

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/25/implementation-principles-of-zenart-class-library-payment-php/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
ZenCart类库payment.php解读实现原理
路径:includes/classes/payment.php paypal:includes/modules/payment/paypal.php 参考:https://blog.csdn.net/yueyekonglong/category_9655974.html __con……
<<上一篇
下一篇>>
文章目录
关闭
目 录