This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Response actions | |
* | |
* do_action( 'wc_paysafe_payment_response_processed', $order, $response ); | |
* do_action( 'wc_paysafe_redirect_hosted_response_processed', $response, $this, $order ); | |
* do_action( 'wc_paysafe_redirect_hosted_declined_response_processed', $response, $this, $order ); | |
* do_action( 'wc_paysafe_redirect_hosted_cancelled_response_processed', $response, $this, $order ); | |
* do_action( 'wc_paysafe_redirect_hosted_errored_response_processed', $response, $this, $order ); | |
* do_action( 'wc_paysafe_redirect_hosted_pending_response_processed', $response, $this, $order ); | |
* do_action( 'wc_paysafe_redirect_hosted_settlement_response_processed', $response, $this, $order ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'wc_paysafe_checkoutjs_account_id', 'prefix_paysafe_checkout_api_account_id', 10, 3 ); | |
/** | |
* @param string $account_id The default Account ID for the type | |
* @param \WcPaysafe\Api\Data_Sources\Order_Source|\WcPaysafe\Api\Data_Sources\User_Source $data_source | |
* @param string $payment_type The type of payment to be processed. | |
* Possible values: cards|directdebit|interac|iframe | |
* Note : The $payment_type values explained: | |
* 1. cards - Cards API transaction | |
* 2. directdebit - Direct Debit API transaction | |
* 3. interac - Interac transaction - not yet supported |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* NOTЕ: Add the code to your "themes\child-theme\functions.php" file | |
*/ | |
add_filter( 'wc_trustcommerce_process_single_payment_request', 'prefix_modify_payment_request', 10, 3 ); | |
function prefix_modify_payment_request( $request, $order, $gateway ) { | |
// You have access to all request properties right before a payment request is sent. | |
// Disable the AVS | |
if ( isset( $request['avs'] ) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_footer', 'prefix_hide_the_card_form' ); | |
function prefix_hide_the_card_form() { | |
// Checkout or the Pay page | |
if ( is_checkout() || is_checkout_pay_page() ) { | |
?> | |
<style> | |
.payment_method_psigate div#credit_card_info { | |
display: none !important; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Normal order | |
add_filter( 'wc_paysafe_request_params', 'prefix_add_account_number', 10, 2 ); | |
// Subscriptions/Pre-Orders order | |
add_filter( 'wc_paysafe_addons_request_params', 'prefix_add_account_number', 10, 2 ); | |
/** | |
* @param $params | |
* @param WC_Order $order | |
* | |
* @return mixed | |
*/ |