Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
woocommerce-quick-donation
Project
Project
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wordpress
woocommerce-quick-donation
Commits
2598780c
Commit
2598780c
authored
Nov 14, 2015
by
Varun Sridharan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue Fixed
* Fixed #56 * Fixed #62
parent
61e0140e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
17 deletions
+3
-17
class-admin-functions.php
includes/admin/class-admin-functions.php
+1
-1
class-quick-donation-functions.php
includes/class-quick-donation-functions.php
+2
-16
No files found.
includes/admin/class-admin-functions.php
View file @
2598780c
...
@@ -134,7 +134,7 @@ class WooCommerce_Quick_Donation_Admin_Function {
...
@@ -134,7 +134,7 @@ class WooCommerce_Quick_Donation_Admin_Function {
$type
=
'simple'
;
$type
=
'simple'
;
$install
=
new
WC_QD_INSTALL
;
$install
=
new
WC_QD_INSTALL
;
$callBack_function
=
'create_'
.
$type
.
'_donation'
;
$callBack_function
=
'create_'
.
$type
.
'_donation'
;
$donation_exist
=
$install
::
check_donation_exists
();
$donation_exist
=
$install
->
check_donation_exists
();
if
(
isset
(
$_REQUEST
[
'force'
])){
if
(
isset
(
$_REQUEST
[
'force'
])){
$post_id
=
$install
->
$callBack_function
();
$post_id
=
$install
->
$callBack_function
();
...
...
includes/class-quick-donation-functions.php
View file @
2598780c
...
@@ -398,25 +398,11 @@ class WooCommerce_Quick_Donation_Functions {
...
@@ -398,25 +398,11 @@ class WooCommerce_Quick_Donation_Functions {
public
function
encryptor
(
$action
,
$string
)
{
public
function
encryptor
(
$action
,
$string
)
{
$output
=
false
;
$output
=
false
;
$encrypt_method
=
"AES-256-CBC"
;
//pls set your unique hashing key
$secret_key
=
'muni'
;
$secret_iv
=
'muni123'
;
// hash
$key
=
hash
(
'sha256'
,
$secret_key
);
// iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning
$iv
=
substr
(
hash
(
'sha256'
,
$secret_iv
),
0
,
16
);
//do the encyption given text/string/number
if
(
$action
==
'encrypt'
)
{
if
(
$action
==
'encrypt'
)
{
$output
=
openssl_encrypt
(
$string
,
$encrypt_method
,
$key
,
0
,
$iv
);
$output
=
base64_encode
(
$string
);
$output
=
base64_encode
(
$output
);
}
}
else
if
(
$action
==
'decrypt'
){
else
if
(
$action
==
'decrypt'
){
//decrypt the given text/string/number
$output
=
base64_decode
(
$string
);
$output
=
openssl_decrypt
(
base64_decode
(
$string
),
$encrypt_method
,
$key
,
0
,
$iv
);
}
}
return
$output
;
return
$output
;
...
...
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