{"id":4291,"date":"2026-05-28T14:38:38","date_gmt":"2026-05-28T14:38:38","guid":{"rendered":"https:\/\/glacademy.com.my\/?page_id=4291"},"modified":"2026-06-11T03:52:17","modified_gmt":"2026-06-11T03:52:17","slug":"payment","status":"publish","type":"page","link":"https:\/\/glacademy.edu.my\/ms\/payment\/","title":{"rendered":"Payment (Malay)"},"content":{"rendered":"<!-- GL Academy \u2014 Payment Methods (Malay) -->\n\n<!-- SECTION 1 \u2014 HERO -->\n<section class=\"pay-hero\">\n  <div class=\"pay-hero__bg\" aria-hidden=\"true\"><\/div>\n  <div class=\"pay-hero__inner\">\n    <span class=\"pay-eyebrow\">Yuran Pengajian<\/span>\n    <h1 class=\"pay-hero__title\">Pilihan Pembayaran<br><span class=\"hp-gradient-text\">yang Mudah &amp; Selamat.<\/span><\/h1>\n    <p class=\"pay-hero__sub\">Bayar yuran pengajian anda melalui pemindahan bank, kod QR, atau dalam talian. Pelbagai kaedah diterima \u2014 pilih yang paling sesuai untuk anda.<\/p>\n    <div class=\"pay-hero__methods\" aria-hidden=\"true\">\n      <span class=\"pay-hero__badge\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"3\" y1=\"21\" x2=\"21\" y2=\"21\"\/><line x1=\"4\" y1=\"10\" x2=\"4\" y2=\"18\"\/><line x1=\"9\" y1=\"10\" x2=\"9\" y2=\"18\"\/><line x1=\"15\" y1=\"10\" x2=\"15\" y2=\"18\"\/><line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"18\"\/><polyline points=\"2 10 12 3 22 10\"\/><\/svg><span>Pemindahan Bank<\/span><\/span>\n      \n      <span class=\"pay-hero__badge\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"2\" y=\"5\" width=\"20\" height=\"14\" rx=\"2\"\/><line x1=\"2\" y1=\"10\" x2=\"22\" y2=\"10\"\/><\/svg><span>Pembayaran Dalam Talian<\/span><\/span>\n      <span class=\"pay-hero__badge\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"9\"\/><line x1=\"3\" y1=\"12\" x2=\"21\" y2=\"12\"\/><path d=\"M12 3a15 15 0 0 1 0 18 15 15 0 0 1 0-18z\"\/><\/svg><span>Alipay+<\/span><\/span>\n    <\/div>\n  <\/div>\n<\/section>\n\n\n<!-- SECTION 2 \u2014 BANK TRANSFER -->\n<section class=\"pay-method\" id=\"pay-bank\">\n  <div class=\"pay-method__inner\">\n\n    <div class=\"pay-method__head\">\n      <div class=\"pay-method__badge pay-method__badge--blue\">Pilihan 1<\/div>\n      <h2 class=\"pay-section__title\">Pemindahan Bank<\/h2>\n      <p class=\"pay-section__intro\">Pindahkan terus ke akaun bank kami. Gunakan nama penuh anak anda sebagai rujukan pembayaran supaya kami dapat menghubungkan pembayaran kepada pelajar yang betul.<\/p>\n    <\/div>\n\n    <div class=\"pay-bank-switcher\">\n      <button class=\"pay-bank-tab pay-bank-tab--active\" data-tab=\"myr\" type=\"button\">\ud83c\uddf2\ud83c\uddfe MYR \u2014 Ringgit Malaysia<\/button>\n      <button class=\"pay-bank-tab\" data-tab=\"usd\" type=\"button\">\ud83c\uddfa\ud83c\uddf8 USD \u2014 Dolar Amerika<\/button>\n    <\/div>\n\n    <!-- MYR Account -->\n    <div class=\"pay-bank-card\" id=\"pay-bank-myr\">\n      <div class=\"pay-bank-card__top\">\n        <div class=\"pay-bank-card__bank-wrap\">\n          <div class=\"pay-bank-card__bank-logo\" aria-hidden=\"true\">\n            <svg width=\"22\" height=\"22\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#C9A961\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"10\" rx=\"2\"\/><path d=\"M7 11V7a5 5 0 0110 0v4\"\/><\/svg>\n          <\/div>\n          <div>\n            <div class=\"pay-bank-card__bank-name\">AmBank (M) Berhad<\/div>\n            <div class=\"pay-bank-card__bank-sub\">SWIFT \/ BIC: ARBKMYKL<\/div>\n          <\/div>\n        <\/div>\n        <span class=\"pay-bank-card__type\">Akaun MYR<\/span>\n      <\/div>\n      <div class=\"pay-bank-card__divider\"><\/div>\n      <div class=\"pay-bank-card__rows\">\n        <div class=\"pay-bank-card__row\">\n          <span class=\"pay-bank-card__label\">Nombor Akaun<\/span>\n          <div class=\"pay-bank-card__num-wrap\">\n            <span class=\"pay-bank-card__num\" id=\"pay-acc-num-myr\">888-1064-7467-04<\/span>\n            <button class=\"pay-copy-btn\" data-copy-target=\"pay-acc-num-myr\" type=\"button\" aria-label=\"Salin nombor akaun\">\n              <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\"\/><path d=\"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1\"\/><\/svg>\n              <span>Salin<\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n        <div class=\"pay-bank-card__row\">\n          <span class=\"pay-bank-card__label\">Nama Akaun<\/span>\n          <span class=\"pay-bank-card__val\">GL Education Group Sdn Bhd<\/span>\n        <\/div>\n        <div class=\"pay-bank-card__row\">\n          <span class=\"pay-bank-card__label\">SWIFT \/ BIC<\/span>\n          <div class=\"pay-bank-card__num-wrap\">\n            <span class=\"pay-bank-card__val\" id=\"pay-swift-myr\">ARBKMYKL<\/span>\n            <button class=\"pay-copy-btn\" data-copy-target=\"pay-swift-myr\" type=\"button\" aria-label=\"Salin kod SWIFT\">\n              <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\"\/><path d=\"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1\"\/><\/svg>\n              <span>Salin<\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"pay-bank-card__note\">\n        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"\/><line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\"\/><line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\"\/><\/svg>\n        Gunakan nama penuh anak anda sebagai rujukan pembayaran\n      <\/div>\n    <\/div>\n\n    <!-- USD Account -->\n    <div class=\"pay-bank-card pay-bank-card--hidden\" id=\"pay-bank-usd\">\n      <div class=\"pay-bank-card__top\">\n        <div class=\"pay-bank-card__bank-wrap\">\n          <div class=\"pay-bank-card__bank-logo\" aria-hidden=\"true\">\n            <svg width=\"22\" height=\"22\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#C9A961\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"10\" rx=\"2\"\/><path d=\"M7 11V7a5 5 0 0110 0v4\"\/><\/svg>\n          <\/div>\n          <div>\n            <div class=\"pay-bank-card__bank-name\">AmBank (M) Berhad<\/div>\n            <div class=\"pay-bank-card__bank-sub\">SWIFT \/ BIC: ARBKMYKL<\/div>\n          <\/div>\n        <\/div>\n        <span class=\"pay-bank-card__type\">Akaun USD<\/span>\n      <\/div>\n      <div class=\"pay-bank-card__divider\"><\/div>\n      <div class=\"pay-bank-card__rows\">\n        <div class=\"pay-bank-card__row\">\n          <span class=\"pay-bank-card__label\">Nombor Akaun<\/span>\n          <div class=\"pay-bank-card__num-wrap\">\n            <span class=\"pay-bank-card__num\" id=\"pay-acc-num-usd\">888-3000-775-778<\/span>\n            <button class=\"pay-copy-btn\" data-copy-target=\"pay-acc-num-usd\" type=\"button\" aria-label=\"Salin nombor akaun\">\n              <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\"\/><path d=\"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1\"\/><\/svg>\n              <span>Salin<\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n        <div class=\"pay-bank-card__row\">\n          <span class=\"pay-bank-card__label\">Nama Akaun<\/span>\n          <span class=\"pay-bank-card__val\">GL Education Group Sdn Bhd<\/span>\n        <\/div>\n        <div class=\"pay-bank-card__row\">\n          <span class=\"pay-bank-card__label\">SWIFT \/ BIC<\/span>\n          <div class=\"pay-bank-card__num-wrap\">\n            <span class=\"pay-bank-card__val\" id=\"pay-swift-usd\">ARBKMYKL<\/span>\n            <button class=\"pay-copy-btn\" data-copy-target=\"pay-swift-usd\" type=\"button\" aria-label=\"Salin kod SWIFT\">\n              <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\"\/><path d=\"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1\"\/><\/svg>\n              <span>Salin<\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n      <div class=\"pay-bank-card__note\">\n        <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"\/><line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\"\/><line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\"\/><\/svg>\n        Gunakan nama penuh anak anda sebagai rujukan pembayaran. Untuk pemindahan antarabangsa, sila sertakan juga kod SWIFT.\n      <\/div>\n    <\/div>\n  <\/div>\n<\/section>\n\n\n<!-- ============================================================\n  SECTION 3 \u2014 ONLINE PAYMENT\n  Generated by build_pay_pages.py \u2014 edit the template there, not here, or the\n  eight language versions drift apart.\n\n  The DuitNow QR block that used to sit here was removed on 26 Aug 2026: a scan\n  recorded neither who paid nor what for, so every one became a reconciliation job.\n============================================================ -->\n<section class=\"pay-method pay-method--alt\" id=\"pay-online\">\n  <div class=\"pay-method__inner\">\n\n    <div class=\"pay-method__head\">\n      <div class=\"pay-method__badge pay-method__badge--teal\">Pilihan 2<\/div>\n      <h2 class=\"pay-section__title\">Bayar Dalam Talian<\/h2>\n      <p class=\"pay-section__intro\">Bayar melalui perbankan internet Malaysia (FPX), kad, atau Alipay. Pelajar berdaftar boleh menyemak baki tertunggak dan membayar kesemuanya, sebahagiannya, atau satu item sahaja.<\/p>\n    <\/div>\n\n    <!-- Direct route into the ERP. The marketing site is not always reachable from\n         mainland China; the ERP page is built to load with nothing external at all. -->\n    <p class=\"glp-alt\">Halaman ini bermasalah? Anda juga boleh membayar terus di\n      <a class=\"glp-alt__link\" href=\"https:\/\/erp.glacademy.edu.my\/pay\" rel=\"noopener\">Buka halaman pembayaran<\/a>\n    <\/p>\n\n    <div class=\"glp\" id=\"gl-pay-app\">\n\n      <!-- Step 1 \u2014 who is paying -->\n      <div class=\"glp-step\" id=\"glp-step-who\">\n        <h3 class=\"glp-h\">Sebelum kita mula<\/h3>\n        <p class=\"glp-sub\">Ini membantu kami mengkreditkan akaun yang betul.<\/p>\n        <div class=\"glp-choice-grid\">\n          <button type=\"button\" class=\"glp-choice\" data-who=\"registered\">\n            <span class=\"glp-choice__ico\"><svg class=\"glp-ico\" width=\"22\" height=\"22\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M22 10L12 5 2 10l10 5 10-5z\"\/><path d=\"M6 12v5c0 1.66 2.69 3 6 3s6-1.34 6-3v-5\"\/><\/svg><\/span>\n            <span class=\"glp-choice__body\">\n              <span class=\"glp-choice__title\">Saya pelajar berdaftar<\/span>\n              <span class=\"glp-choice__sub\">Semak invois anda dan bayar jumlah tertunggak<\/span>\n            <\/span>\n            <span class=\"glp-choice__go\"><svg class=\"glp-ico\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"9 18 15 12 9 6\"\/><\/svg><\/span>\n          <\/button>\n          <button type=\"button\" class=\"glp-choice\" data-who=\"new\">\n            <span class=\"glp-choice__ico\"><svg class=\"glp-ico\" width=\"22\" height=\"22\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\"\/><circle cx=\"9\" cy=\"7\" r=\"4\"\/><line x1=\"19\" y1=\"8\" x2=\"19\" y2=\"14\"\/><line x1=\"22\" y1=\"11\" x2=\"16\" y2=\"11\"\/><\/svg><\/span>\n            <span class=\"glp-choice__body\">\n              <span class=\"glp-choice__title\">Saya belum mendaftar<\/span>\n              <span class=\"glp-choice__sub\">Bayar deposit atau jumlah sekali sahaja<\/span>\n            <\/span>\n            <span class=\"glp-choice__go\"><svg class=\"glp-ico\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"9 18 15 12 9 6\"\/><\/svg><\/span>\n          <\/button>\n        <\/div>\n      <\/div>\n\n      <!-- Step 2 \u2014 find the account -->\n      <div class=\"glp-step glp-hidden\" id=\"glp-step-find\">\n        <button type=\"button\" class=\"glp-back\" data-goto=\"who\"><svg class=\"glp-ico\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"19\" y1=\"12\" x2=\"5\" y2=\"12\"\/><polyline points=\"12 19 5 12 12 5\"\/><\/svg><span>Kembali<\/span><\/button>\n        <h3 class=\"glp-h\">Cari invois anda<\/h3>\n        <p class=\"glp-sub\">Masukkan alamat e-mel dalam rekod kami \u2014 milik pelajar atau ibu bapa \u2014 atau nombor pasport \/ kad pengenalan yang digunakan semasa pendaftaran.<\/p>\n\n        <form id=\"glp-find-form\" novalidate>\n          <div class=\"glp-field\">\n            <label class=\"glp-label\" for=\"glp-q\">E-mel, pasport atau nombor KP<\/label>\n            <input class=\"glp-input\" id=\"glp-q\" type=\"text\" autocomplete=\"email\"\n                   placeholder=\"parent@email.com  atau  A12345678\" required>\n          <\/div>\n          <div class=\"glp-error\" id=\"glp-find-error\" role=\"alert\"><\/div>\n          <button class=\"glp-btn\" id=\"glp-find-btn\" type=\"submit\">\n            <svg class=\"glp-ico\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><circle cx=\"11\" cy=\"11\" r=\"7\"\/><line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"\/><\/svg><span>Cari invois saya<\/span>\n          <\/button>\n        <\/form>\n\n        <p class=\"glp-fine\"><svg class=\"glp-ico\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"\/><\/svg><span>Untuk perlindungan anda, kami hanya memaparkan nama dan e-mel yang sebahagiannya disembunyikan \u2014 cukup untuk anda mengenali akaun sendiri. Jika tiada rekod ditemui, e-mel kepada <a href=\"mailto:hello@glacademy.edu.my\">hello@glacademy.edu.my<\/a>.<\/span><\/p>\n      <\/div>\n\n      <!-- Step 3 \u2014 choose what to pay -->\n      <div class=\"glp-step glp-hidden\" id=\"glp-step-pick\">\n        <button type=\"button\" class=\"glp-back\" data-goto=\"find\"><svg class=\"glp-ico\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"19\" y1=\"12\" x2=\"5\" y2=\"12\"\/><polyline points=\"12 19 5 12 12 5\"\/><\/svg><span>Cari semula<\/span><\/button>\n        <h3 class=\"glp-h\">Apakah yang ingin anda bayar?<\/h3>\n        <p class=\"glp-sub\">Pilih keseluruhan invois, atau pilih item tertentu. Anda juga boleh memasukkan jumlah yang lebih kecil bagi mana-mana item untuk membayar secara beransur.<\/p>\n\n        <div id=\"glp-students\"><\/div>\n\n        <div class=\"glp-extra\">\n          <label class=\"glp-check\">\n            <input type=\"checkbox\" id=\"glp-extra-on\">\n            <span class=\"glp-check__label\"><svg class=\"glp-ico\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"\/><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"\/><\/svg><span>Tambah sesuatu yang tiada dalam senarai di atas<\/span><\/span>\n          <\/label>\n          <div class=\"glp-extra__fields glp-hidden\" id=\"glp-extra-fields\">\n            <div class=\"glp-row\">\n              <div class=\"glp-field\">\n                <label class=\"glp-label\" for=\"glp-extra-desc\">Untuk apa bayaran ini?<\/label>\n                <input class=\"glp-input\" id=\"glp-extra-desc\" type=\"text\" placeholder=\"cth. Deposit IEP, kemasukan Januari\">\n              <\/div>\n              <div class=\"glp-field\">\n                <label class=\"glp-label\" for=\"glp-extra-amt\">Jumlah (MYR)<\/label>\n                <div class=\"glp-amount\"><span class=\"glp-amount__cur\">RM<\/span>\n                  <input class=\"glp-input glp-input--amount\" id=\"glp-extra-amt\" type=\"number\" min=\"1\" step=\"0.01\" placeholder=\"0.00\"><\/div>\n              <\/div>\n            <\/div>\n            <p class=\"glp-fine\"><svg class=\"glp-ico\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"\/><\/svg><span>Bayaran yang tiada dalam invois diuruskan secara berasingan. Anda akan menerima e-mel pengesahan, dan pasukan kewangan kami akan mengeluarkan resit rasmi setelah ia dipadankan dengan akaun anda.<\/span><\/p>\n          <\/div>\n        <\/div>\n\n        <div class=\"glp-total\">\n          <span class=\"glp-total__label\">Dipilih<\/span>\n          <span class=\"glp-total__amount\" id=\"glp-total\">RM 0.00<\/span>\n        <\/div>\n        <div class=\"glp-error\" id=\"glp-pick-error\" role=\"alert\"><\/div>\n        <button class=\"glp-btn\" id=\"glp-pick-next\" type=\"button\" disabled>\n          <span>Teruskan<\/span><svg class=\"glp-ico\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"9 18 15 12 9 6\"\/><\/svg>\n        <\/button>\n      <\/div>\n\n      <!-- Step 3b \u2014 not registered -->\n      <div class=\"glp-step glp-hidden\" id=\"glp-step-new\">\n        <button type=\"button\" class=\"glp-back\" data-goto=\"who\"><svg class=\"glp-ico\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"19\" y1=\"12\" x2=\"5\" y2=\"12\"\/><polyline points=\"12 19 5 12 12 5\"\/><\/svg><span>Kembali<\/span><\/button>\n        <h3 class=\"glp-h\">Maklumat anda<\/h3>\n        <p class=\"glp-sub\">Kami akan menghantar pengesahan melalui e-mel, dan pasukan kami akan menghubungi anda untuk membuka akaun.<\/p>\n\n        <div class=\"glp-row\">\n          <div class=\"glp-field\">\n            <label class=\"glp-label\" for=\"glp-n-name\">Nama penuh<\/label>\n            <input class=\"glp-input\" id=\"glp-n-name\" type=\"text\" autocomplete=\"name\" placeholder=\"cth. Lim Jun Wei\">\n          <\/div>\n          <div class=\"glp-field\">\n            <label class=\"glp-label\" for=\"glp-n-email\">Alamat e-mel<\/label>\n            <input class=\"glp-input\" id=\"glp-n-email\" type=\"email\" autocomplete=\"email\" placeholder=\"cth. parent@email.com\">\n          <\/div>\n        <\/div>\n        <div class=\"glp-row\">\n          <div class=\"glp-field\">\n            <label class=\"glp-label\" for=\"glp-n-phone\">Nombor telefon<\/label>\n            <input class=\"glp-input\" id=\"glp-n-phone\" type=\"tel\" autocomplete=\"tel\" placeholder=\"cth. 012-345 6789\">\n          <\/div>\n          <div class=\"glp-field\">\n            <label class=\"glp-label\" for=\"glp-n-amt\">Jumlah (MYR)<\/label>\n            <div class=\"glp-amount\"><span class=\"glp-amount__cur\">RM<\/span>\n              <input class=\"glp-input glp-input--amount\" id=\"glp-n-amt\" type=\"number\" min=\"1\" step=\"0.01\" placeholder=\"0.00\"><\/div>\n          <\/div>\n        <\/div>\n        <div class=\"glp-field\">\n          <label class=\"glp-label\" for=\"glp-n-desc\">Untuk apa bayaran ini?<\/label>\n          <input class=\"glp-input\" id=\"glp-n-desc\" type=\"text\" placeholder=\"cth. Deposit IEP, kemasukan Januari\">\n        <\/div>\n\n        <p class=\"glp-fine\"><svg class=\"glp-ico\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"\/><\/svg><span>Ini adalah bayaran, bukan pendaftaran. Kami akan menghantar pengesahan serta-merta; resit rasmi menyusul setelah pasukan kewangan memadankannya dengan akaun anda.<\/span><\/p>\n        <div class=\"glp-error\" id=\"glp-new-error\" role=\"alert\"><\/div>\n        <button class=\"glp-btn\" id=\"glp-new-next\" type=\"button\">\n          <span>Teruskan<\/span><svg class=\"glp-ico\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"9 18 15 12 9 6\"\/><\/svg>\n        <\/button>\n      <\/div>\n\n      <!-- Step 4 \u2014 method -->\n      <div class=\"glp-step glp-hidden\" id=\"glp-step-method\">\n        <button type=\"button\" class=\"glp-back\" id=\"glp-method-back\"><svg class=\"glp-ico\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"19\" y1=\"12\" x2=\"5\" y2=\"12\"\/><polyline points=\"12 19 5 12 12 5\"\/><\/svg><span>Kembali<\/span><\/button>\n        <h3 class=\"glp-h\">Bagaimana anda ingin membayar?<\/h3>\n        <div class=\"glp-summary\" id=\"glp-summary\"><\/div>\n\n        <div id=\"glp-payer-block\">\n          <div class=\"glp-row\">\n            <div class=\"glp-field\">\n              <label class=\"glp-label\" for=\"glp-p-name\">Nama pembayar<\/label>\n              <input class=\"glp-input\" id=\"glp-p-name\" type=\"text\" autocomplete=\"name\" placeholder=\"cth. Lim Mei Ling\">\n            <\/div>\n            <div class=\"glp-field\">\n              <label class=\"glp-label\" for=\"glp-p-email\">E-mel untuk pengesahan<\/label>\n              <input class=\"glp-input\" id=\"glp-p-email\" type=\"email\" autocomplete=\"email\" placeholder=\"cth. parent@email.com\">\n            <\/div>\n          <\/div>\n        <\/div>\n\n        <div class=\"glp-method-grid glp-method-grid--3\">\n          <button type=\"button\" class=\"glp-method\" data-method=\"fpx\">\n            <span class=\"glp-method__ico\"><svg class=\"glp-ico\" width=\"22\" height=\"22\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"3\" y1=\"21\" x2=\"21\" y2=\"21\"\/><line x1=\"4\" y1=\"10\" x2=\"4\" y2=\"18\"\/><line x1=\"9\" y1=\"10\" x2=\"9\" y2=\"18\"\/><line x1=\"15\" y1=\"10\" x2=\"15\" y2=\"18\"\/><line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"18\"\/><polyline points=\"2 10 12 3 22 10\"\/><\/svg><\/span>\n            <span class=\"glp-method__body\">\n              <span class=\"glp-method__title\">Perbankan internet (FPX)<\/span>\n              <span class=\"glp-method__sub\">Bayar terus dari akaun bank Malaysia anda<\/span>\n            <\/span>\n          <\/button>\n          <button type=\"button\" class=\"glp-method\" data-method=\"card\">\n            <span class=\"glp-method__ico\"><svg class=\"glp-ico\" width=\"22\" height=\"22\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"2\" y=\"5\" width=\"20\" height=\"14\" rx=\"2\"\/><line x1=\"2\" y1=\"10\" x2=\"22\" y2=\"10\"\/><\/svg><\/span>\n            <span class=\"glp-method__body\">\n              <span class=\"glp-method__title\">Kad Debit \/ Kredit<\/span>\n              <span class=\"glp-method__sub\">Visa dan Mastercard<\/span>\n            <\/span>\n          <\/button>\n          <button type=\"button\" class=\"glp-method\" data-method=\"alipay\">\n            <span class=\"glp-method__ico\"><svg class=\"glp-ico\" width=\"22\" height=\"22\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M3 7V5a2 2 0 0 1 2-2h2\"\/><path d=\"M17 3h2a2 2 0 0 1 2 2v2\"\/><path d=\"M21 17v2a2 2 0 0 1-2 2h-2\"\/><path d=\"M7 21H5a2 2 0 0 1-2-2v-2\"\/><rect x=\"7\" y=\"7\" width=\"4\" height=\"4\"\/><rect x=\"13\" y=\"13\" width=\"4\" height=\"4\"\/><\/svg><\/span>\n            <span class=\"glp-method__body\">\n              <span class=\"glp-method__title\">Alipay<\/span>\n              <span class=\"glp-method__sub\">Imbas dengan aplikasi Alipay<\/span>\n            <\/span>\n          <\/button>\n        <\/div>\n\n        <!-- What the payer will actually see once they reach Stripe. Apple Pay and\n             Google Pay appear automatically on a supported device; the card brands are\n             those enabled on the account. -->\n        <div class=\"glp-accepts\">\n          <span class=\"glp-accepts__label\">Turut diterima<\/span>\n          <span class=\"glp-accepts__list\">\n            <span class=\"glp-brand\">Apple&nbsp;Pay<\/span>\n            <span class=\"glp-brand\">Google&nbsp;Pay<\/span>\n            <span class=\"glp-brand\">Visa<\/span>\n            <span class=\"glp-brand\">Mastercard<\/span>\n            <span class=\"glp-brand\">UnionPay<\/span>\n          <\/span>\n        <\/div>\n\n        <div class=\"glp-error\" id=\"glp-method-error\" role=\"alert\"><\/div>\n        <p class=\"glp-fine\"><svg class=\"glp-ico\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\"\/><path d=\"M7 11V7a5 5 0 0 1 10 0v4\"\/><\/svg><span>Anda akan dibawa ke halaman pembayaran yang selamat. GL Academy tidak sekali-kali melihat atau menyimpan maklumat kad atau perbankan anda.<\/span><\/p>\n      <\/div>\n\n      <!-- Step 5 \u2014 outcome, shown on return from the gateway -->\n      <div class=\"glp-step glp-hidden\" id=\"glp-step-done\">\n        <div class=\"glp-result glp-result--ok glp-hidden\" id=\"glp-result-ok\">\n          <span class=\"glp-result__ico\"><svg class=\"glp-ico\" width=\"30\" height=\"30\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"\/><polyline points=\"22 4 12 14.01 9 11.01\"\/><\/svg><\/span>\n          <h3 class=\"glp-h\">Bayaran diterima<\/h3>\n          <p class=\"glp-sub\">Terima kasih. Pengesahan sedang dihantar ke e-mel anda. Jika anda membayar invois, resit rasmi akan menyusul sebentar lagi.<\/p>\n          <p class=\"glp-ref\" id=\"glp-done-ref\"><\/p>\n        <\/div>\n        <div class=\"glp-result glp-result--bad glp-hidden\" id=\"glp-result-bad\">\n          <span class=\"glp-result__ico\"><svg class=\"glp-ico\" width=\"30\" height=\"30\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"\/><line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"\/><line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"\/><\/svg><\/span>\n          <h3 class=\"glp-h\">Bayaran tidak selesai<\/h3>\n          <p class=\"glp-sub\">Tiada caj dikenakan. Anda boleh cuba semula, atau membuat pemindahan bank menggunakan maklumat di atas.<\/p>\n        <\/div>\n        <button type=\"button\" class=\"glp-btn glp-btn--ghost\" data-goto=\"who\">Buat bayaran lain<\/button>\n      <\/div>\n\n    <\/div>\n  <\/div>\n<\/section>\n\n\n<!-- SECTION 5 \u2014 AFTER PAYMENT -->\n<section class=\"pay-notice\">\n  <div class=\"pay-notice__inner\">\n\n    <div class=\"pay-notice__icon\" aria-hidden=\"true\">\n      <svg width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#C9A961\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 12 19.79 19.79 0 01.22 3.38a2 2 0 012-2.18h3a2 2 0 012 1.72c.127.96.361 1.903.7 2.81a2 2 0 01-.45 2.11L6.91 8.5a16 16 0 006.29 6.29l1.39-1.56a2 2 0 012.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0122 16.92z\"\/><\/svg>\n    <\/div>\n\n    <div class=\"pay-notice__content\">\n      <h2>Selepas Pembayaran \u2014 Penting<\/h2>\n      <p>Setelah pembayaran dibuat, sila <strong>hantar resit pembayaran anda<\/strong> berserta maklumat berikut kepada perunding yang dilantik atau ke peti masuk umum kami:<\/p>\n\n      <div class=\"pay-notice__details\">\n        <div class=\"pay-notice__detail\">\n          <span class=\"pay-notice__detail-label\">Maklumat Diperlukan<\/span>\n          <ul>\n            <li>Resit pembayaran \/ tangkapan skrin<\/li>\n            <li>Nama penuh pelajar<\/li>\n            <li>Tarikh lahir pelajar<\/li>\n          <\/ul>\n        <\/div>\n        <div class=\"pay-notice__detail\">\n          <span class=\"pay-notice__detail-label\">Hantar Kepada<\/span>\n          <a href=\"mailto:hello@glacademy.edu.my\" class=\"pay-notice__email\">hello@glacademy.edu.my<\/a>\n          <span class=\"pay-notice__or\">atau perunding GL Academy yang dilantik untuk anda<\/span>\n        <\/div>\n      <\/div>\n\n      <div class=\"pay-notice__wa\">\n        <a href=\"https:\/\/wa.me\/601137959673?text=Hi%20GL%20Academy%2C%20Saya%20telah%20membuat%20pembayaran%20dan%20ingin%20menghantar%20resit%20saya.\" target=\"_blank\" rel=\"noopener\" class=\"hp-btn hp-btn--primary\">\n          <svg viewBox=\"0 0 24 24\" fill=\"currentColor\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z\"\/><\/svg>\n          Hantar Resit melalui WhatsApp\n        <\/a>\n        <a href=\"mailto:hello@glacademy.edu.my?subject=Penghantaran%20Resit%20Pembayaran&body=Sila%20rujuk%20resit%20pembayaran%20saya%20yang%20dilampirkan.%0A%0ANama%20Pelajar%3A%20%0ATarikh%20Lahir%3A%20\" class=\"hp-btn hp-btn--outline\">\n          <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"\/><polyline points=\"22,6 12,13 2,6\"\/><\/svg>\n          Hantar Resit melalui E-mel\n        <\/a>\n      <\/div>\n    <\/div>\n  <\/div>\n<\/section>\n\n\n<script>\n(function () {\n  'use strict';\n\n  \/* \u2500\u2500 Copy buttons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  document.querySelectorAll('.pay-copy-btn[data-copy-target]').forEach(function (btn) {\n    btn.addEventListener('click', function () {\n      var targetEl = document.getElementById(btn.dataset.copyTarget);\n      if (!targetEl) return;\n      var text = targetEl.textContent.replace(\/[-\\s]\/g, '').trim();\n      navigator.clipboard.writeText(text).then(function () {\n        var label = btn.querySelector('span');\n        if (label) label.textContent = 'Disalin!';\n        btn.classList.add('pay-copy-btn--done');\n        setTimeout(function () {\n          if (label) label.textContent = 'Salin';\n          btn.classList.remove('pay-copy-btn--done');\n        }, 2000);\n      });\n    });\n  });\n\n  \/* \u2500\u2500 Bank currency tabs \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 *\/\n  document.querySelectorAll('.pay-bank-tab').forEach(function (tab) {\n    tab.addEventListener('click', function () {\n      document.querySelectorAll('.pay-bank-tab').forEach(function (t) {\n        t.classList.remove('pay-bank-tab--active');\n      });\n      tab.classList.add('pay-bank-tab--active');\n      var currency = tab.dataset.tab;\n      document.getElementById('pay-bank-myr').classList.toggle('pay-bank-card--hidden', currency !== 'myr');\n      document.getElementById('pay-bank-usd').classList.toggle('pay-bank-card--hidden', currency !== 'usd');\n    });\n  });\n\n  \/* The old Xendit form was removed on 26 Aug 2026 \u2014 it created payments that\n     could not be tied to an invoice. Online payments now go through the ERP. *\/\n\n}());\n<\/script>\n\n<!-- ============================================================\n  ONLINE PAYMENT \u2014 behaviour\n  Generated by build_pay_pages.py. Talks to WordPress, which proxies to the ERP with the\n  API key attached server-side. Every amount chosen here is re-validated against the real\n  invoice before a ringgit is charged, so this file only ever builds a REQUEST.\n============================================================ -->\n<script>\n(function () {\n  \"use strict\";\n  var app = document.getElementById(\"gl-pay-app\");\n  if (!app) return;\n\n  var API = \"\/wp-json\/glacademy\/v1\";\n  var T = {due: \"tertunggak\", nothingDue: \"Tiada baki tertunggak \u2014 terima kasih.\", ref: \"Rujukan\", searching: \"Mencari\u2026\", selected: \"Dipilih\", eQuery: \"Sila masukkan alamat e-mel, pasport atau nombor kad pengenalan.\", eNotFound: \"Kami tidak menemui akaun dengan maklumat tersebut. Semak ejaan, cuba alamat e-mel yang lain, atau e-mel hello@glacademy.edu.my dan kami akan membantu.\", eTooMany: \"Terlalu banyak carian. Sila tunggu beberapa minit dan cuba lagi.\", eSearch: \"Kami tidak dapat membuat carian buat masa ini. Sila cuba sebentar lagi.\", eNetwork: \"Kami tidak dapat menghubungi sistem. Sila semak sambungan anda dan cuba lagi.\", ePick: \"Sila pilih sekurang-kurangnya satu item untuk dibayar.\", eMix: \"Sila bayar item invois dahulu, kemudian tambah bayaran tambahan secara berasingan \u2014 resitnya berbeza.\", eName: \"Sila masukkan nama penuh anda.\", eEmail: \"Sila masukkan alamat e-mel yang sah \u2014 pengesahan akan dihantar ke sana.\", eAmount: \"Sila masukkan jumlah yang ingin anda bayar.\", eDesc: \"Sila nyatakan tujuan bayaran ini.\", ePayerName: \"Sila masukkan nama pembayar.\", eStart: \"Kami tidak dapat memulakan bayaran. Sila cuba lagi, atau buat pemindahan bank di atas.\"};\n\n  var state = { who: null, students: [], picked: {}, extra: null, payer: {}, kind: \"invoice\", pending: null, backTo: \"who\" };\n\n  function $(id) { return document.getElementById(id); }\n  function rm(n) { return \"RM \" + (Number(n) || 0).toLocaleString(\"en-MY\", { minimumFractionDigits: 2, maximumFractionDigits: 2 }); }\n  function esc(s) {\n    return String(s == null ? \"\" : s).replace(\/[&<>\"']\/g, function (c) {\n      return { \"&\": \"&amp;\", \"<\": \"&lt;\", \">\": \"&gt;\", '\"': \"&quot;\", \"'\": \"&#39;\" }[c];\n    });\n  }\n  function show(id) {\n    var steps = app.querySelectorAll(\".glp-step\");\n    for (var i = 0; i < steps.length; i++) steps[i].classList.add(\"glp-hidden\");\n    $(id).classList.remove(\"glp-hidden\");\n    app.scrollIntoView({ behavior: \"smooth\", block: \"nearest\" });\n  }\n  function err(id, msg) { var e = $(id); if (e) { e.textContent = msg || \"\"; e.classList.toggle(\"glp-error--on\", !!msg); } }\n  function busy(btn, on, label) {\n    if (!btn) return;\n    btn.disabled = !!on;\n    var s = btn.querySelector(\"span\");\n    if (!s) return;\n    if (on) { s.dataset.was = s.textContent; s.textContent = label || T.searching; }\n    else if (s.dataset.was) { s.textContent = s.dataset.was; }\n  }\n  function detail(d, fallback) { return (d && d.detail) ? d.detail : fallback; }\n\n  async function post(path, body) {\n    var r = await fetch(API + path, { method: \"POST\", headers: { \"Content-Type\": \"application\/json\" }, body: JSON.stringify(body) });\n    var data = null;\n    try { data = await r.json(); } catch (e) { data = null; }\n    if (!r.ok) throw data || {};\n    return data;\n  }\n\n  \/* ---- step 1 ---- *\/\n  app.addEventListener(\"click\", function (ev) {\n    var c = ev.target.closest(\"[data-who]\");\n    if (c) {\n      state.who = c.getAttribute(\"data-who\");\n      state.kind = state.who === \"new\" ? \"adhoc\" : \"invoice\";\n      show(state.who === \"new\" ? \"glp-step-new\" : \"glp-step-find\");\n      return;\n    }\n    var b = ev.target.closest(\"[data-goto]\");\n    if (b) {\n      var to = b.getAttribute(\"data-goto\");\n      if (to === \"who\") { state.picked = {}; state.extra = null; state.payer = {}; state.pending = null; }\n      show(\"glp-step-\" + to);\n    }\n  });\n\n  \/* ---- step 2: find ---- *\/\n  $(\"glp-find-form\").addEventListener(\"submit\", async function (ev) {\n    ev.preventDefault();\n    var q = $(\"glp-q\").value.trim();\n    err(\"glp-find-error\", \"\");\n    if (!q) { err(\"glp-find-error\", T.eQuery); return; }\n\n    var btn = $(\"glp-find-btn\");\n    busy(btn, true);\n    try {\n      var r = await fetch(API + \"\/pay-lookup?q=\" + encodeURIComponent(q));\n      var data = null;\n      try { data = await r.json(); } catch (e) { data = null; }\n      if (r.status === 429) { err(\"glp-find-error\", detail(data, T.eTooMany)); return; }\n      if (!r.ok) { err(\"glp-find-error\", detail(data, T.eSearch)); return; }\n      if (!data.found || !data.students.length) { err(\"glp-find-error\", T.eNotFound); return; }\n      state.students = data.students; state.picked = {}; state.extra = null;\n      renderStudents();\n      show(\"glp-step-pick\");\n    } catch (e) {\n      err(\"glp-find-error\", T.eNetwork);\n    } finally { busy(btn, false); }\n  });\n\n  \/* ---- step 3: pick ---- *\/\n  function renderStudents() {\n    var html = \"\";\n    state.students.forEach(function (st, si) {\n      html += '<div class=\"glp-student\">';\n      html += '<div class=\"glp-student__head\">';\n      html += '<span class=\"glp-student__name\">' + esc(st.masked_name) + \"<\/span>\";\n      html += '<span class=\"glp-student__email\">' + esc(st.masked_email) + \"<\/span>\";\n      html += '<span class=\"glp-student__due\">' + rm(st.total_due) + \"<\/span><\/div>\";\n      if (!st.invoices.length) html += '<p class=\"glp-student__clear\">' + esc(T.nothingDue) + \"<\/p>\";\n      st.invoices.forEach(function (inv, ii) {\n        var key = si + \":\" + ii;\n        html += '<div class=\"glp-inv\">';\n        html += '<label class=\"glp-inv__head\"><input type=\"checkbox\" class=\"glp-inv__all\" data-inv=\"' + key + '\">';\n        html += '<span class=\"glp-inv__no\">' + esc(inv.invoice_number) + \"<\/span>\";\n        if (inv.due_date) html += '<span class=\"glp-inv__date\">' + esc(inv.due_date) + \"<\/span>\";\n        html += '<span class=\"glp-inv__amt\">' + rm(inv.balance) + \"<\/span><\/label>\";\n        html += '<div class=\"glp-items\">';\n        inv.items.forEach(function (it, xi) {\n          var ik = key + \":\" + xi;\n          html += '<div class=\"glp-item\"><label class=\"glp-item__main\">';\n          html += '<input type=\"checkbox\" class=\"glp-item__on\" data-item=\"' + ik + '\">';\n          html += '<span class=\"glp-item__desc\">' + esc(it.description || \"\") + \"<\/span><\/label>\";\n          html += '<div class=\"glp-item__pay\"><span class=\"glp-item__due\">' + rm(it.due) + \" \" + esc(T.due) + \"<\/span>\";\n          html += '<div class=\"glp-amount glp-amount--sm\"><span class=\"glp-amount__cur\">RM<\/span>';\n          html += '<input class=\"glp-input glp-input--amount glp-item__amt\" data-item=\"' + ik + '\" type=\"number\" min=\"0.01\" step=\"0.01\" max=\"' + it.due + '\" value=\"' + it.due.toFixed(2) + '\" disabled><\/div>';\n          html += \"<\/div><\/div>\";\n        });\n        html += \"<\/div><\/div>\";\n      });\n      html += \"<\/div>\";\n    });\n    $(\"glp-students\").innerHTML = html;\n    recalc();\n  }\n\n  function itemAt(k) { var p = k.split(\":\"); return state.students[+p[0]].invoices[+p[1]].items[+p[2]]; }\n  function invAt(k) { var p = k.split(\":\"); return state.students[+p[0]].invoices[+p[1]]; }\n\n  $(\"glp-students\").addEventListener(\"change\", function (ev) {\n    var t = ev.target;\n    if (t.classList.contains(\"glp-inv__all\")) {\n      var key = t.getAttribute(\"data-inv\");\n      var boxes = $(\"glp-students\").querySelectorAll('.glp-item__on[data-item^=\"' + key + ':\"]');\n      for (var i = 0; i < boxes.length; i++) { boxes[i].checked = t.checked; syncItem(boxes[i]); }\n    }\n    if (t.classList.contains(\"glp-item__on\")) syncItem(t);\n    if (t.classList.contains(\"glp-item__amt\")) {\n      var ik = t.getAttribute(\"data-item\"), due = itemAt(ik).due, v = parseFloat(t.value);\n      if (isNaN(v) || v <= 0) t.value = \"\"; else if (v > due) t.value = due.toFixed(2);\n      if (state.picked[ik]) state.picked[ik].amount = parseFloat(t.value) || 0;\n    }\n    recalc();\n  });\n  $(\"glp-students\").addEventListener(\"input\", function (ev) {\n    if (!ev.target.classList.contains(\"glp-item__amt\")) return;\n    var ik = ev.target.getAttribute(\"data-item\");\n    if (state.picked[ik]) state.picked[ik].amount = parseFloat(ev.target.value) || 0;\n    recalc();\n  });\n\n  function syncItem(box) {\n    var ik = box.getAttribute(\"data-item\");\n    var amt = $(\"glp-students\").querySelector('.glp-item__amt[data-item=\"' + ik + '\"]');\n    var it = itemAt(ik), inv = invAt(ik);\n    amt.disabled = !box.checked;\n    if (box.checked) {\n      if (!parseFloat(amt.value)) amt.value = it.due.toFixed(2);\n      state.picked[ik] = { invoice_id: inv.invoice_id, item_id: it.item_id, amount: parseFloat(amt.value) || it.due, label: it.description, invoice_number: inv.invoice_number };\n    } else { delete state.picked[ik]; }\n  }\n\n  $(\"glp-extra-on\").addEventListener(\"change\", function () {\n    $(\"glp-extra-fields\").classList.toggle(\"glp-hidden\", !this.checked);\n    if (!this.checked) { state.extra = null; recalc(); }\n  });\n  [\"glp-extra-desc\", \"glp-extra-amt\"].forEach(function (id) {\n    $(id).addEventListener(\"input\", function () {\n      var d = $(\"glp-extra-desc\").value.trim(), a = parseFloat($(\"glp-extra-amt\").value) || 0;\n      state.extra = (d && a > 0) ? { description: d, amount: a } : null;\n      recalc();\n    });\n  });\n\n  function total() {\n    var s = 0;\n    Object.keys(state.picked).forEach(function (k) { s += Number(state.picked[k].amount) || 0; });\n    if (state.extra) s += Number(state.extra.amount) || 0;\n    return Math.round(s * 100) \/ 100;\n  }\n  function recalc() { $(\"glp-total\").textContent = rm(total()); $(\"glp-pick-next\").disabled = total() <= 0; }\n\n  $(\"glp-pick-next\").addEventListener(\"click\", function () {\n    err(\"glp-pick-error\", \"\");\n    var allocs = Object.keys(state.picked).map(function (k) { return state.picked[k]; });\n    if (!allocs.length && !state.extra) { err(\"glp-pick-error\", T.ePick); return; }\n    \/* An invoice payment becomes a receipt; an off-invoice extra only a confirmation.\n       Two different kinds of record, so they cannot ride on one charge. *\/\n    if (allocs.length && state.extra) { err(\"glp-pick-error\", T.eMix); return; }\n\n    if (state.extra) { state.kind = \"adhoc\"; state.pending = { description: state.extra.description, amount: state.extra.amount }; }\n    else { state.kind = \"invoice\"; state.pending = { allocations: allocs.map(function (a) { return { invoice_id: a.invoice_id, item_id: a.item_id, amount: a.amount }; }) }; }\n    state.backTo = \"pick\";\n    $(\"glp-payer-block\").classList.toggle(\"glp-hidden\", state.kind !== \"adhoc\");\n    renderSummary(allocs, total());\n    show(\"glp-step-method\");\n  });\n\n  function renderSummary(allocs, sum) {\n    var html = '<ul class=\"glp-summary__list\">';\n    if (state.kind === \"adhoc\") {\n      html += \"<li><span>\" + esc(state.pending.description) + \"<\/span><b>\" + rm(state.pending.amount) + \"<\/b><\/li>\";\n    } else {\n      allocs.forEach(function (a) {\n        html += \"<li><span>\" + esc(a.invoice_number) + \" &middot; \" + esc(a.label) + \"<\/span><b>\" + rm(a.amount) + \"<\/b><\/li>\";\n      });\n    }\n    html += \"<\/ul><div class=\\\"glp-summary__total\\\"><span>\" + esc(T.selected) + \"<\/span><b>\" + rm(sum) + \"<\/b><\/div>\";\n    $(\"glp-summary\").innerHTML = html;\n  }\n\n  \/* ---- step 3b: not registered ---- *\/\n  $(\"glp-new-next\").addEventListener(\"click\", function () {\n    err(\"glp-new-error\", \"\");\n    var name = $(\"glp-n-name\").value.trim(), email = $(\"glp-n-email\").value.trim();\n    var amt = parseFloat($(\"glp-n-amt\").value) || 0, desc = $(\"glp-n-desc\").value.trim();\n    if (!name) { err(\"glp-new-error\", T.eName); $(\"glp-n-name\").focus(); return; }\n    if (!\/^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$\/.test(email)) { err(\"glp-new-error\", T.eEmail); $(\"glp-n-email\").focus(); return; }\n    if (amt <= 0) { err(\"glp-new-error\", T.eAmount); $(\"glp-n-amt\").focus(); return; }\n    if (!desc) { err(\"glp-new-error\", T.eDesc); $(\"glp-n-desc\").focus(); return; }\n\n    state.kind = \"adhoc\";\n    state.payer = { payer_name: name, payer_email: email, payer_phone: $(\"glp-n-phone\").value.trim() };\n    state.pending = { description: desc, amount: amt };\n    state.backTo = \"new\";\n    $(\"glp-payer-block\").classList.add(\"glp-hidden\");\n    renderSummary([], amt);\n    show(\"glp-step-method\");\n  });\n\n  $(\"glp-method-back\").addEventListener(\"click\", function () { show(\"glp-step-\" + (state.backTo || \"who\")); });\n\n  \/* ---- step 4: pay ---- *\/\n  app.addEventListener(\"click\", async function (ev) {\n    var m = ev.target.closest(\"[data-method]\");\n    if (!m) return;\n    err(\"glp-method-error\", \"\");\n\n    var payer = state.payer;\n    \/* Only asked when we have nobody on file. A matched family already identified itself\n       by finding its invoices, and the server fills the name and email from the student\n       record \u2014 server-side on purpose, because the lookup returns only MASKED details and\n       pre-filling the real ones here would undo the masking. *\/\n    if (state.kind === \"adhoc\" && !payer.payer_email) {\n      var name = $(\"glp-p-name\").value.trim(), email = $(\"glp-p-email\").value.trim();\n      if (!name) { err(\"glp-method-error\", T.ePayerName); $(\"glp-p-name\").focus(); return; }\n      if (!\/^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$\/.test(email)) { err(\"glp-method-error\", T.eEmail); $(\"glp-p-email\").focus(); return; }\n      payer = { payer_name: name, payer_email: email, payer_phone: \"\" };\n      state.payer = payer;\n    }\n\n    var body = Object.assign({ kind: state.kind, method: m.getAttribute(\"data-method\") }, payer, state.pending);\n    var btns = app.querySelectorAll(\"[data-method]\");\n    for (var i = 0; i < btns.length; i++) btns[i].disabled = true;\n    try {\n      var res = await post(\"\/pay-start\", body);\n      window.location.href = res.url;\n    } catch (e) {\n      err(\"glp-method-error\", detail(e, T.eStart));\n      for (var j = 0; j < btns.length; j++) btns[j].disabled = false;\n    }\n  });\n\n  \/* ---- back from the gateway ---- *\/\n  (function () {\n    var p = new URLSearchParams(window.location.search);\n    var paid = p.get(\"paid\"), failed = p.get(\"failed\");\n    if (!paid && !failed) return;\n    show(\"glp-step-done\");\n    if (paid) { $(\"glp-result-ok\").classList.remove(\"glp-hidden\"); $(\"glp-done-ref\").textContent = T.ref + \": \" + paid; }\n    else { $(\"glp-result-bad\").classList.remove(\"glp-hidden\"); }\n    window.history.replaceState({}, \"\", window.location.pathname + \"#pay-online\");\n  })();\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4291","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/glacademy.edu.my\/ms\/wp-json\/wp\/v2\/pages\/4291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/glacademy.edu.my\/ms\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/glacademy.edu.my\/ms\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/glacademy.edu.my\/ms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/glacademy.edu.my\/ms\/wp-json\/wp\/v2\/comments?post=4291"}],"version-history":[{"count":5,"href":"https:\/\/glacademy.edu.my\/ms\/wp-json\/wp\/v2\/pages\/4291\/revisions"}],"predecessor-version":[{"id":5098,"href":"https:\/\/glacademy.edu.my\/ms\/wp-json\/wp\/v2\/pages\/4291\/revisions\/5098"}],"wp:attachment":[{"href":"https:\/\/glacademy.edu.my\/ms\/wp-json\/wp\/v2\/media?parent=4291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}