Allow paying course fees with Protocoin
This commit is contained in:
@@ -7,6 +7,7 @@ import { apiUrl, isAdmin, getInstructor, BasicTable, requester, useIsMobile } fr
|
||||
import { NotFound } from './Misc.js';
|
||||
import { InstructorClassDetail, InstructorClassAttendance } from './InstructorClasses.js';
|
||||
import { PayPalPayNow } from './PayPal.js';
|
||||
import { PayWithProtocoin } from './Paymaster.js';
|
||||
import { tags } from './Courses.js';
|
||||
|
||||
function ClassTable(props) {
|
||||
@@ -693,6 +694,18 @@ export function ClassDetail(props) {
|
||||
name={clazz.course_data.name}
|
||||
custom={JSON.stringify({ training: userTraining.id })}
|
||||
/>
|
||||
|
||||
<p/>
|
||||
|
||||
<PayWithProtocoin
|
||||
token={token} user={user} refreshUser={refreshUser}
|
||||
amount={clazz.cost}
|
||||
onSuccess={() => {
|
||||
refreshUser();
|
||||
refreshClass();
|
||||
}}
|
||||
custom={{ category: 'OnAcct', training: userTraining.id }}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user