Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
TimeOutAdmin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TimeOut
TimeOutAdmin
Commits
e680e527
Commit
e680e527
authored
Oct 04, 2019
by
Tobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc
parent
3b036b3c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
38 deletions
+39
-38
Api.php
application/controllers/Api.php
+0
-0
generals_helper.php
application/helpers/generals_helper.php
+3
-3
Api_model.php
application/models/Api_model.php
+22
-19
Webservice_model.php
application/models/Webservice_model.php
+10
-12
payment.php
application/views/payment/payment.php
+4
-4
No files found.
application/controllers/Api.php
View file @
e680e527
This diff is collapsed.
Click to expand it.
application/helpers/generals_helper.php
View file @
e680e527
...
...
@@ -125,9 +125,9 @@
return
$savePath
;
}
function
BayanPayPayment
(){
include
'BayanPayPaymentLibrary.php'
;
}
//
function BayanPayPayment(){
//
include 'BayanPayPaymentLibrary.php';
//
}
function
getCurrency
(
$userId
=
''
){
$CI
=
&
get_instance
();
...
...
application/models/Api_model.php
View file @
e680e527
...
...
@@ -557,30 +557,30 @@ class Api_model extends CI_Model {
$imgExt
=
strtolower
(
$imgNameArr
[
1
]);
if
(
$imgExt
==
'png'
||
$imgExt
==
'jpeg'
||
$imgExt
==
'jpg'
||
$imgExt
==
'gif'
){
$imgPath
=
'assets/uploads/user/CUST_'
.
$user_id
.
'.
png'
;
$imgQRPath
=
'assets/uploads/user/CUST_QR_'
.
$user_id
.
'.png'
;
$bagImagePath
=
'assets/uploads/user/bitmoji_back.png'
;
$imgPath
=
'assets/uploads/user/CUST_'
.
$user_id
.
'.
'
.
$imgExt
;
//
$imgQRPath = 'assets/uploads/user/CUST_QR_'.$user_id.'.png';
//
$bagImagePath = 'assets/uploads/user/bitmoji_back.png';
move_uploaded_file
(
$data
[
'file'
][
"tmp_name"
],
"./"
.
$imgPath
);
$imgSrc
=
imagecreatefrompng
(
$imgPath
);
$bagSrc
=
imagecreatefrompng
(
$bagImagePath
);
$bagW
=
imagesx
(
$bagSrc
)
/
3
;
$bagH
=
imagesy
(
$bagSrc
)
/
3
;
$imgW
=
imagesx
(
$imgSrc
);
$imgH
=
imagesy
(
$imgSrc
);
$scale
=
$imgW
/
$bagW
;
$iWidth
=
$bagW
;
$iHeight
=
$imgH
/
$scale
;
//
$imgSrc = imagecreatefrompng($imgPath);
//
$bagSrc = imagecreatefrompng($bagImagePath);
//
$bagW = imagesx($bagSrc)/3;
//
$bagH = imagesy($bagSrc)/3;
//
$imgW = imagesx($imgSrc);
//
$imgH = imagesy($imgSrc);
//
$scale = $imgW/$bagW;
//
$iWidth = $bagW;
//
$iHeight = $imgH/$scale;
imagecopyresampled
(
$bagSrc
,
$imgSrc
,
$iWidth
,
$bagH
,
0
,
0
,
$iWidth
,
$iHeight
,
$imgW
,
$imgH
);
imagepng
(
$bagSrc
,
$imgPath
);
imagealphablending
(
$imgPath
,
false
);
imagesavealpha
(
$imgPath
,
true
);
//
imagecopyresampled($bagSrc,$imgSrc,$iWidth,$bagH,0,0,$iWidth,$iHeight,$imgW,$imgH);
//
imagepng($bagSrc,$imgPath);
//
imagealphablending($imgPath, false);
//
imagesavealpha($imgPath, true);
genQRcode
(
encode_param
(
$user_id
),
$imgQRPath
,
$imgPath
);
//
genQRcode(encode_param($user_id),$imgQRPath,$imgPath);
$post_data
[
'profile_image'
]
=
$imgPath
;
$post_data
[
'profile_image_qr'
]
=
$imgQRPath
;
$post_data
[
'profile_image_qr'
]
=
''
;
//
$imgQRPath;
$state
=
$this
->
db
->
where
(
'customer_id'
,
$user_id
)
->
update
(
'customer'
,
$post_data
);
if
(
$state
){
...
...
@@ -1339,8 +1339,11 @@ class Api_model extends CI_Model {
return
$this
->
db
->
get
()
->
row
();
}
function
update_payment
(
$response
,
$transactionid
,
$last_id
,
$status
){
function
update_payment
(
$response
=
''
,
$transactionid
=
''
,
$last_id
,
$status
){
try
{
if
(
empty
(
$last_id
)){
return
;
}
$this
->
db
->
update
(
'transaction'
,
array
(
'transaction_id'
=>
$transactionid
,
'transaction_response'
=>
json_encode
(
$response
),
...
...
application/models/Webservice_model.php
View file @
e680e527
...
...
@@ -967,23 +967,21 @@ class Webservice_model extends CI_Model {
$this
->
db
->
from
(
'users'
);
$this
->
db
->
join
(
'customer'
,
'customer.customer_id = users.id'
);
$num
=
$this
->
db
->
get
()
->
num_rows
();
if
(
$num
>
0
)
{
if
(
$num
>
0
)
{
$res
=
array
(
'status'
=>
0
,
'message'
=>
'Email address already exist'
,
'code'
=>
'ER32'
);
return
$res
;
}
}
if
(
isset
(
$data
[
'file'
])){
$img
=
$data
[
'file'
][
'name'
];
$expbanner
=
explode
(
'.'
,
$img
);
$img_ext
=
strtolower
(
$expbanner
[
1
]);
$rand
=
rand
(
10000
,
99999
);
$encname
=
time
()
.
$rand
;
if
(
$img_ext
==
'png'
||
$img_ext
==
'jpeg'
||
$img_ext
==
'jpg'
||
$img_ext
==
'gif'
){
$bannername
=
$encname
.
'.'
.
$img_ext
;
$imagePath
=
"./assets/uploads/"
.
$bannername
;
$post_data
[
'profile_image'
]
=
"assets/uploads/"
.
$bannername
;
move_uploaded_file
(
$data
[
'file'
][
"tmp_name"
],
$imagePath
);
$imgName
=
$data
[
'file'
][
'name'
];
$imgNameArr
=
explode
(
'.'
,
$imgName
);
$imgExt
=
strtolower
(
$imgNameArr
[
1
]);
if
(
$imgExt
==
'png'
||
$imgExt
==
'jpeg'
||
$imgExt
==
'jpg'
||
$imgExt
==
'gif'
){
$imgPath
=
'assets/uploads/user/CUST_'
.
$user_id
.
'.'
.
$imgExt
;
move_uploaded_file
(
$data
[
'file'
][
"tmp_name"
],
"./"
.
$imgPath
);
$post_data
[
'profile_image'
]
=
$imgPath
;
$state
=
$this
->
db
->
where
(
'customer_id'
,
$user_id
)
->
update
(
'customer'
,
$post_data
);
if
(
$state
){
$img_error
=
1
;
...
...
application/views/payment/payment.php
View file @
e680e527
...
...
@@ -5,10 +5,10 @@
<body>
<center><h1
style=
"margin-top: 20%"
>
Please do not refresh this page...
</h1></center>
<form
action=
"
<?=
$r
equest
Url
?>
"
method=
"post"
id=
"BayanPay_online_payment"
>
<input
type=
"hidden"
name=
"MerchantID"
value=
"
<?php
echo
$m
erchant
Id
;
?>
"
>
<input
type=
"hidden"
name=
"CollaboratorID"
value=
"
<?php
echo
$col
laborator
Id
;
?>
"
>
<input
type=
"hidden"
name=
"requestParameter"
value=
"
<?=
$requestParam
eter
?>
"
>
<form
action=
"
<?=
$rUrl
?>
"
method=
"post"
id=
"BayanPay_online_payment"
>
<input
type=
"hidden"
name=
"MerchantID"
value=
"
<?php
echo
$mId
;
?>
"
>
<input
type=
"hidden"
name=
"CollaboratorID"
value=
"
<?php
echo
$col
ab
Id
;
?>
"
>
<input
type=
"hidden"
name=
"requestParameter"
value=
"
<?=
$requestParam
?>
"
>
</form>
<script
type=
"text/javascript"
>
document
.
addEventListener
(
"DOMContentLoaded"
,
function
(
event
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment