Changeset 2744562
- Timestamp:
- 06/18/2022 12:42:06 PM (4 years ago)
- Location:
- idpay-mycred/trunk
- Files:
-
- 3 edited
-
class-mycred-gateway-idpay.php (modified) (10 diffs)
-
idpay-mycred.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
idpay-mycred/trunk/class-mycred-gateway-idpay.php
r2408296 r2744562 128 128 <input id="<?php echo $this->field_id( 'sandbox' ); ?>" 129 129 name="<?php echo $this->field_name( 'sandbox' ); ?>" 130 <?php echo $prefs['sandbox'] == "on"? 'checked="checked"' : '' ?>130 <?php echo $prefs['sandbox'] == false ? '' : 'checked="checked"' ?> 131 131 type="checkbox"/> 132 132 </div> … … 185 185 $new_data['currency'] = sanitize_text_field( $data['currency'] ); 186 186 $new_data['item_name'] = sanitize_text_field( $data['item_name'] ); 187 $new_data['sandbox'] = sanitize_text_field( $data['sandbox'] ) ;187 $new_data['sandbox'] = sanitize_text_field( $data['sandbox'] ) == 'on' ? 'on' : 'off'; 188 188 189 189 if ( isset( $data['exchange'] ) ) { … … 214 214 if ( $status == 10 ) { 215 215 $api_key = $api_key = $this->prefs['api_key']; 216 $sandbox = $this->prefs['sandbox'];216 $sandbox = !($this->prefs['sandbox'] == false); 217 217 218 218 $data = [ … … 234 234 if ( is_wp_error( $response ) ) { 235 235 $log = $response->get_error_message(); 236 $this->log_call( $pending_post_id, $log );237 236 $mycred->add_to_log( 238 237 'buy_creds_with_idpay', … … 254 253 if ( $http_status != 200 ) { 255 254 $log = sprintf( __( 'An error occurred while verifying the transaction. status: %s, code: %s, message: %s', 'idpay-mycred' ), $http_status, $result->error_code, $result->error_message ); 256 $this->log_call( $pending_post_id, $log );257 255 $mycred->add_to_log( 258 256 'buy_creds_with_idpay', … … 277 275 278 276 if ( $this->complete_payment( $org_pending_payment, $id ) ) { 279 280 $this->log_call( $pending_post_id, $message );281 $this->trash_pending_payment( $pending_post_id );282 283 $return = add_query_arg( 'mycred_idpay_ok', $message, $this->get_thankyou() );284 wp_redirect( $return );285 exit;286 } else {287 288 $log = sprintf( __( 'An unexpected error occurred when completing the payment but it is done at the gateway. Track id is: %s', 'idpay-mycred', $result->track_id ) );289 $this->log_call( $pending_post_id, $log );290 277 $mycred->add_to_log( 291 278 'buy_creds_with_idpay', … … 296 283 $result 297 284 ); 285 $this->trash_pending_payment( $pending_post_id ); 286 287 $return = add_query_arg( 'mycred_idpay_ok', $message, $this->get_thankyou() ); 288 wp_redirect( $return ); 289 exit; 290 } else { 291 292 $log = sprintf( __( 'An unexpected error occurred when completing the payment but it is done at the gateway. Track id is: %s', 'idpay-mycred', $result->track_id ) ); 293 $mycred->add_to_log( 294 'buy_creds_with_idpay', 295 $pending_payment->buyer_id, 296 $pending_payment->amount, 297 $log, 298 $pending_payment->buyer_id, 299 $result 300 ); 298 301 299 302 $return = add_query_arg( 'mycred_idpay_nok', $log, $this->get_cancelled() ); … … 304 307 305 308 $log = sprintf( __( 'Payment failed. Status: %s, Track id: %s, Card no: %s', 'idpay-mycred' ), $result->status, $result->track_id, $result->payment->card_no ); 306 $this->log_call( $pending_post_id, $log );307 309 $mycred->add_to_log( 308 310 'buy_creds_with_idpay', … … 322 324 323 325 $log = sprintf( __( '%s (Code: %s), Track id: %s', 'idpay-mycred' ), $error, $status, $track_id ); 324 $this->log_call( $pending_post_id, $log );325 326 $mycred->add_to_log( 326 327 'buy_creds_with_idpay', … … 386 387 $callback = add_query_arg( 'payment_id', $this->transaction_id, $this->callback_url() ); 387 388 $api_key = $this->prefs['api_key']; 388 $sandbox = $this->prefs['sandbox']; 389 389 $sandbox = $this->prefs['sandbox'] == false ? false : true; 390 390 $data = [ 391 391 'order_id' => $this->transaction_id, -
idpay-mycred/trunk/idpay-mycred.php
r2408296 r2744562 2 2 /* 3 3 Plugin Name: IDPay myCRED 4 Version: 1. 1.14 Version: 1.2.0 5 5 Description: IDPay payment gateway for myCRED 6 6 Author: IDPay -
idpay-mycred/trunk/readme.txt
r2408296 r2744562 1 1 === IDPay myCRED === 2 Contributors: imikiani, meysamrazmi, vispa 3 Tags: idpay, gateway, mycred, point, credit 4 Stable tag: 1. 1.15 Tested up to: 5.22 Contributors: imikiani, meysamrazmi, vispa, Mohammad Malek(MimDeveloper.Tv) 3 Tags: idpay, gateway, mycred, point, credit,payment 4 Stable tag: 1.2.0 5 Tested up to: 6.0 6 6 License: GPLv2 or later 7 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 18 18 19 19 == Changelog == 20 21 = 1.2.0, June 13, 2022 = 22 * Fix SandBox Mode For Payment In Fake State 23 * Important : Fix Save Transaction Status In Wrong Location 20 24 21 25 = 1.1.1, October 13, 2020 =
Note: See TracChangeset
for help on using the changeset viewer.