RCP custom payment gateway - init() method
<?php | |
/** | |
* Get things going | |
* | |
* @access public | |
* @since 1.0 | |
* @return void | |
*/ | |
public function init() { | |
global $rcp_options; | |
$this->supports[] = 'one-time'; | |
$this->supports[] = 'recurring'; | |
$this->supports[] = 'fees'; | |
$this->supports[] = 'trial'; | |
if ( $this->test_mode ) { | |
$this->api_login_id = isset( $rcp_options['authorize_test_api_login'] ) ? sanitize_text_field( $rcp_options['authorize_test_api_login'] ) : ''; | |
$this->transaction_key = isset( $rcp_options['authorize_test_txn_key'] ) ? sanitize_text_field( $rcp_options['authorize_test_txn_key'] ) : ''; | |
$this->transaction_signature = isset( $rcp_options['authorize_test_signature_key'] ) ? sanitize_text_field( $rcp_options['authorize_test_signature_key'] ) : ''; | |
} else { | |
$this->api_login_id = isset( $rcp_options['authorize_api_login'] ) ? sanitize_text_field( $rcp_options['authorize_api_login'] ) : ''; | |
$this->transaction_key = isset( $rcp_options['authorize_txn_key'] ) ? sanitize_text_field( $rcp_options['authorize_txn_key'] ) : ''; | |
$this->transaction_signature = isset( $rcp_options['authorize_signature_key'] ) ? sanitize_text_field( $rcp_options['authorize_signature_key'] ) : ''; | |
} | |
require_once RCP_ANET_PATH . 'vendor/autoload.php'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment