Merge branch 'master' of bitbucket.org:venbainformationtechnology/golf_backend

This commit is contained in:
unknown 2023-06-24 15:07:14 +05:30
commit a7a48be691
2 changed files with 9 additions and 8 deletions

View File

@ -291,13 +291,8 @@ class PaymentController extends BaseController
$data['country'] = $this->CountryModel->findAll(); $data['country'] = $this->CountryModel->findAll();
$data['userdata'] = $this->MemberModel->select('member.* , zipcode.code as zipcode') $data['userdata'] = $this->MemberModel->where('id', session()->get('logged_user'))->find();
->join('zipcode', 'member.pincode = zipcode.id', 'left')
->where('member.id', session()->get('logged_user'))
->find();
$if_trans_exist = $this->TransactionModel->where('member_id', session()->get('logged_user')) $if_trans_exist = $this->TransactionModel->where('member_id', session()->get('logged_user'))

View File

@ -1,4 +1,5 @@
async function CardPay(fieldEl, buttonEl) { async function CardPay(fieldEl, buttonEl) {
// Create a card payment object and attach to page // Create a card payment object and attach to page
const card = await window.payments.card({ const card = await window.payments.card({
style: { style: {
@ -13,13 +14,18 @@ async function CardPay(fieldEl, buttonEl) {
await card.attach(fieldEl); await card.attach(fieldEl);
async function eventHandler(event) { async function eventHandler(event) {
// Clear any existing messages // Clear any existing messages
window.paymentFlowMessageEl.innerText = ''; window.paymentFlowMessageEl.innerText = '';
try { try {
const result = await card.tokenize(); const result = await card.tokenize();
if (result.status === 'OK') { if (result.status === 'OK') {
$('#loading-spinner-overlay').css('visibility', 'visible'); $('#loading-spinner-overlay').css('visibility', 'visible');
// Use global method from sq-payment-flow.js // Use global method from sq-payment-flow.js
window.createPayment(result.token); window.createPayment(result.token);
} }