Skip to content

Commit a285e5b

Browse files
committed
Updated purchase string to include currency
1 parent ed9876b commit a285e5b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lang/en/tool_paymentplugin.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
// Purchase page.
5252
$string['purchasepagetitle'] = 'Purchase course';
53-
$string['purchasepagecourse'] = 'You are buying the course: "{$a->name}" for ${$a->cost}.';
53+
$string['purchasepagecourse'] = 'You are buying the course: "{$a->name}" for {$a->cost} {$a->currency}.';
5454

5555
// Errors.
5656
$string['errorcoursecost'] = 'Please insert a valid number.';

purchase.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@
5656
$courseinfo->name = format_string($course->fullname, true, array('context' => $context));
5757
$record = $DB->get_record('tool_paymentplugin_course', ['courseid' => $courseid]);
5858
$courseinfo->cost = $record->cost;
59+
$courseinfo->currency = strtoupper(get_config('tool_paymentplugin', 'currency'));
5960
echo get_string('purchasepagecourse', 'tool_paymentplugin', $courseinfo);
6061

6162
// Display Payment Gateway Form.
6263
if (count(paymentgateway::get_all_enabled_gateway_objects()) != 0) {
6364
$paymentform = new tool_paymentplugin\form\purchase(new moodle_url(
64-
'/admin/tool/paymentplugin/test_paypal_sdk.php',
65+
'/admin/tool/paymentplugin/purchase.php',
6566
array('id' => $courseid)), array('id' => $courseid));
6667
$paymentform->display();
6768
} else {

0 commit comments

Comments
 (0)