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

本篇解读includes/classes/payment.php

 


关于具体实现模块的翻译

__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

Post-process 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

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


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值