-
AuthorPosts
-
October 25, 2023 at 6:06 am #179208
AndreParticipant1) Recharge Bug
If wallet balance is added during customer checkout in different currency (order in processing stage) recharge values seem to be added to the wallet correctly. However, wallet top-ups can be abused by fraudsters and it is safer to only recharge the wallet balance AFTER admin has approved the order and changed status to Complete. When this happens, the value is incorrectly calculated and added to wallet balance.-
More detail & test cases:
Default store currency: USD
Woo Wallet provided the following snippet which we use to ensure wallet top-ups are only added after order is changed to Complete status.
add_filter(‘wallet_credit_purchase_order_status’, ‘wallet_credit_purchase_order_status_callback’);
function wallet_credit_purchase_order_status_callback(){
return array(‘completed’);
}
TEST 1 (without above snippet) – Customer top-up USD 100. Correct USD 100 is added to wallet.
TEST 2 (without above snippet) – Customer top-up CAD 137.40 ($100). Correct USD 100 is added to wallet.
TEST 3 (incl above snippet) – Customer top-up USD 100. Order changed to Complete by Admin. Correct USD 100 is added to wallet.
TEST 4 (incl above snippet) – Customer top-up CAD 137.40 ($100). Order changed to Complete by Admin. Error: USD 72.78 added to wallet.It appears that this bug only applies when the customer transacts in non-default currency and admin later completes the order (default currency). The conversion is not required a second time if completed by admin in the default currency later.
2) Cashback bug
Woo Wallet setting provide an option to add a cashback at Processing state or Complete status. We prefer to also only add Cashbacks at Complete status, but we tested both scenarios.
TEST 1 – Woo Wallet set to pay cashback at Processing state. Customer transacts in USD. Correct USD 10 cashback added to wallet.
TEST 2 – Woo Wallet set to pay cashback at Processing state. Customer transacts in CAD. Error: USD 7.28 cashback added to wallet.
TEST 3 – Woo Wallet set to pay cashback at Complete state. Customer transacts in USD. Correct USD 10 cashback added to wallet.
TEST 4 – Woo Wallet set to pay cashback at Complete state. Customer transacts in CAD. Error: USD 7.28 cashback added to wallet.Cashback bug appear to apply whenever the customer transacts in a currency different from the default currency.
-
AuthorPosts
You must be logged in to see replies to this topic. Click here to login or register