Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Snickser committed May 9, 2024
1 parent a3044c3 commit b64cd10
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
defined('MOODLE_INTERNAL') || die();

$status = required_param('status', PARAM_TEXT);
$invoiceid = required_param('invoice_id', PARAM_TEXT);
$invoiceid = required_param('invoice_id', PARAM_ALPHANUMEXT);
$amountcrypto = required_param('amount_crypto', PARAM_TEXT);
$currency = required_param('currency', PARAM_TEXT);
$orderid = required_param('order_id', PARAM_INT);
Expand Down Expand Up @@ -105,7 +105,11 @@
);

// Write to DB.
$cryptocloudtx->success = 1;
if ($response->result[0]->test_mode == true) {
$cryptocloudtx->success = 3;
} else {
$cryptocloudtx->success = 1;
}
if (!$DB->update_record('paygw_cryptocloud', $cryptocloudtx)) {
die('FAIL. Update db error.');
} else {
Expand Down

0 comments on commit b64cd10

Please sign in to comment.