Skip to content

Commit

Permalink
Remove reliance on failure_redirect parameter (#3)
Browse files Browse the repository at this point in the history
* Remove reliance on failure_redirect parameter

* Bump version to 1.1.2
  • Loading branch information
wzul authored Mar 8, 2023
1 parent 298f486 commit c101a28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/gateways/chip.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function chip_link($params)
return '<p>Secret Key and Brand ID not set</p>';
}

if ( isset($_GET['success']) && $_GET['success'] == 'true' && !empty(Session::get('chip_' . $params['invoiceid'])) ) {
if ( isset($_GET['success']) && !empty(Session::get('chip_' . $params['invoiceid'])) ) {
$payment_id = Session::getAndDelete('chip_' . $params['invoiceid']);

if ( \ChipAction::complete_payment($params, $payment_id) ) {
Expand Down
2 changes: 1 addition & 1 deletion modules/gateways/chip/redirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
'success_callback' => $system_url . 'modules/gateways/callback/chip.php?invoiceid=' . $get_invoice_id,
'success_redirect' => $params['returnurl'] . '&success=true',
'failure_redirect' => $params['returnurl'],
'creator_agent' => 'WHMCS: 1.1.1',
'creator_agent' => 'WHMCS: 1.1.2',
'reference' => $params['invoiceid'],
'platform' => 'whmcs',
'send_receipt' => $params['purchaseSendReceipt'] == 'on',
Expand Down

0 comments on commit c101a28

Please sign in to comment.