Skip to content

Commit 6babced

Browse files
committed
PRE-2955 refactor: delete unnecessary code
1 parent 322eea8 commit 6babced

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/Gateway/PayplugGateway.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,8 +1046,6 @@ public function process_payment_with_token($order, $amount, $customer_id, $token
10461046

10471047
if ( $payment_token->get_gateway_id() =='payplug' && strpos($payment_token->get_token(), 'card') !== 0) {
10481048
$payment_data = $this->hosted_fields->populateCreateWithAliasPayment($payment_data, $order, $order_id, $amount, $payment_token->get_token());
1049-
1050-
// die(var_dump($payment_data));
10511049
$payment_data['metadata']['woocommerce_block'] = "HOSTED_FIELDS";
10521050
}
10531051

@@ -1092,14 +1090,6 @@ public function process_payment_with_token($order, $amount, $customer_id, $token
10921090
} else {
10931091
$redirect = $return_url;
10941092
}
1095-
// if(($payment->__get('is_paid'))){
1096-
// $redirect = $order->get_checkout_order_received_url();
1097-
// }else if(isset($payment->__get('hosted_payment')->payment_url)){
1098-
// $redirect = $payment->__get('hosted_payment')->payment_url;
1099-
// }else{
1100-
// $redirect = $return_url;
1101-
// }
1102-
11031093

11041094
if (isset($payment['EXECCODE']) )
11051095
{

src/Gateway/PayplugResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ protected function maybe_save_card( $resource ) {
505505
$token->set_expiry_year( $set_expiry_year );
506506
$token->set_expiry_month( $set_expiry_month );
507507
$token->set_card_type( $set_card_type );
508-
$token->set_user_id( $customer->ID);
508+
$token->set_user_id( $customer->ID );
509509
$token->add_meta_data( 'mode', $resource->is_live ? 'live' : 'test', true );
510510
$token->add_meta_data( 'payplug_account', \wc_clean( $merchant_id ), true );
511511
$token->save();

0 commit comments

Comments
 (0)