peterburnett / qutcapstone2020 Goto Github PK
View Code? Open in Web Editor NEWRepository for the development of a payment gateway plugin for Moodle LMS
License: GNU General Public License v3.0
Repository for the development of a payment gateway plugin for Moodle LMS
License: GNU General Public License v3.0
https://docs.moodle.org/dev/Database
In point 12, it is mentioned that we should not be using the AS keyword for table names. This is currently done in the SQL queries in the paypal unit tests.
Add to page:
Changing the course cost or currency while a student is making a purchase can result in the transaction taking place but the student not being enrolled. This is because the IPN listener checks for inconsistencies in the transaction cost/currency and the current set cost/currency. This is done to thwart malicious users from tricking the plugin with a self-crafted transaction that has different values for cost/currency.
There is a window between the user loading the purchase.php page and the IPN being processed, in which changing the cost/currency can cause a false negative.
Have text in course_settings.php and paymentgateway_paypal settings warning admin to turn off the plugin first.
Fix various minor issues:
$plugin->requires
to version.phpCreate a dummy course enrolment option for this payment plugin.
Create page with a paypal payment button that directs the user to a paypal payment.
Create page that listens for IPN from paypal to successfully confirm if payment has succeeded or not.
Add to the page:
Client ID textbox
Currency drop down box
Color drop down box: [gold, blue, silver, white, black]
Shape drop down box: [rectangle, pill]
Exception - Call to a member function add() on null
I get this error, its because of the $ADMIN param, I think. Not sure. I am trying to add the sub-plugin settings.
It needs a new name.
Create pay-pal sub plugin that can be detected by moodle.
Enrollment type can be set to purchase, but cost can be left blank. Or, for some reason, course price has been saved as null. Need to put a check for such in this page and possible on the enrollment button.
IPN needs refactoring to be testable. Currently IPN is just a script, needs to be an IPN class that can process and IPN. Put an IPN listener that listens for POST request from PayPal and creates IPN class.
While at it, ensure that edge case of 2 identical IPNs being received can be handled smoothly (occurs if paypal never received IPN validation from us for some reason, or if we were taking too long and a "retry" was sent just as we sent the original back). Should be handled by treating the second identical IPN as a normal IPN, but don't enrol the user a second time.
Create unit tests to test IPN by creating an IPN_test class that extends IPN class.
The following error occurs when trying to set the course price for a second course.
Error writing to database
Debug info: Duplicate entry '0' for key 'mdl_tool_paymentplugin_course.PRIMARY' INSERT INTO mdl_tool_paymentplugin_course (courseid,cost) VALUES(?,?) [array ( 0 => 4, 1 => 0, )] Error code: dmlwriteexception
The issue seems to be the "id" field in the table not being set any value within the code, and so every entry tries to be entered with "id" value of 0. However "id" is a primary key and so an error is thrown.
How does this issue look? Does it have any issues?
Creating an enrolment method (task #8) is impossible, for now create a page that a user can input payment details into. Creating a way for the user to access this page will be a separate issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.