简体   繁体   English

Moodle PayPal Enrollment on Payment 抛出多余代码串吓用户

[英]Moodle PayPal Enrolment on Payment tosses up a superfluous code string that scares users

I have Enrollment on Payment (through PayPal) working flawlessly, except for one things: when users click the "Select Payment Type" button and the enrol.html popup opens, it has the following string under the PayPal payment button:我的付款注册(通过 PayPal)工作正常,除了一件事:当用户单击“选择付款类型”按钮并打开 enrol.html 弹出窗口时,它在 PayPal 付款按钮下有以下字符串:

{$a->label}: {$a->value} {$a->标签}:{$a->值}

screenshot showing oddball code显示古怪代码的屏幕截图

I have searched high and low for any information and have only been able to verify that my integration follows all the instructions.我到处搜索任何信息,只能验证我的集成是否遵循所有说明。 The payments are processed;付款已处理; users receive no error.用户没有收到任何错误。 But that line of code is worrying everyone.但是那一行代码却让大家很担心。 I appreciate any and all help.我感谢所有帮助。

Looks like its a core Moodle string labelvalue in /lang/en/moodle.php看起来它是labelvalue中的核心 Moodle 字符串标签/lang/en/moodle.php

$string['labelvalue'] = '{$a->label}: {$a->value}';

Which is being displayed in the fee breakdown via a mustache template in /payment/templates/fee_breakdown.mustache通过/payment/templates/fee_breakdown.mustache中的小胡子模板显示在费用明细中

<div class="core_payment_fee_breakdown">
    {{#surcharge}}
        {{# str }} labelvalue, core, {
            "label": {{# quote }}{{# str }} cost {{/ str }}{{/ quote }},
            "value": {{# quote }}{{# str }} feeincludesurcharge, core_payment, {
                "fee": "{{fee}}",
                "surcharge": {{surcharge}}
                } {{/ str }}{{/ quote }}
            } {{/ str }}
    {{/surcharge}}
    {{^surcharge}}
        {{# str }} labelvalue, core, {
            "label": {{# quote }}{{# str }} cost {{/ str }}{{/ quote }},
            "value": "{{fee}}"
            } {{/ str }}
    {{/surcharge}}
</div>

Which I think is being called by updateCostRegion in /payment/amd/src/gateways_modal.js我认为它被/payment/amd/src/gateways_modal.js中的updateCostRegion调用

Maybe one of the PayPal settings in Moodle has a null value somewhere, so its not being displayed correctly也许 Moodle 中的 PayPal 设置之一在某处有一个 null 值,所以它没有正确显示

Check the value for the PayPal surcharge - if its already 0 then click save to make sure the database has been updated with 0 rather than a null检查 PayPal 附加费的值 - 如果它已经是 0 然后单击保存以确保数据库已更新为 0 而不是 null

Site admin > Plugins > Payment gateways > Paypal网站管理员 > 插件 > 支付网关 > Paypal

Or direct to /admin/settings.php?section=paymentgatewaypaypal或者直接到/admin/settings.php?section=paymentgatewaypaypal

If that doesn't fix it, then check the enrol cost for the paypal enrolment plugin如果这不能解决问题,请检查 paypal 注册插件的注册成本

Site admin > Plugins > Enrolments > Paypal站点管理员 > 插件 > 注册 > Paypal

Or direct to /admin/settings.php?section=enrolsettingspaypal或者直接到/admin/settings.php?section=enrolsettingspaypal

Again, if Enrol cost is already 0 then save changes to make sure同样,如果注册成本已经为 0,则保存更改以确保

And check the enrol cost for the course并检查课程的注册费用

Course menu > Participants > Enrolment methods > Paypal课程菜单 > 学员 > 报名方式 > Paypal

OK.好的。 It turns out this is a known bug and they're working on it now: https://tracker.moodle.org/browse/MDL-77003事实证明这是一个已知的错误,他们现在正在处理它: https://tracker.moodle.org/browse/MDL-77003

Thank you again, Russell.再次感谢你,拉塞尔。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM