protected function _set_default_properties() { do_action('AHEE_log', __FILE__, __FUNCTION__, ''); parent::_set_default_properties(); // list of fields required for capturing the billing address $this->_billing_info_address_fields = array('_reg-page-billing-fname-' . $this->_gateway_name, '_reg-page-billing-lname-' . $this->_gateway_name, '_reg-page-billing-email-' . $this->_gateway_name, '_reg-page-billing-phone-' . $this->_gateway_name, '_reg-page-billing-address-' . $this->_gateway_name, '_reg-page-billing-city-' . $this->_gateway_name, '_reg-page-billing-state-' . $this->_gateway_name, '_reg-page-billing-country-' . $this->_gateway_name, '_reg-page-billing-zip-' . $this->_gateway_name); // list of fields required for capturing the credit card information $this->_billing_info_credit_card_fields = array('_reg-page-billing-card-type-' . $this->_gateway_name, '_reg-page-billing-card-nmbr-' . $this->_gateway_name, '_reg-page-billing-card-exp-date-mnth-' . $this->_gateway_name, '_reg-page-billing-card-exp-date-year-' . $this->_gateway_name, '_reg-page-billing-card-ccv-code-' . $this->_gateway_name); }
/** * Updates the transaction in the session to acknowledge the registrant is done * the registration process, all that remains is for them ot make the offline * payment. Was renamed from 'set_transaction_details' to 'thank_you_page()', because it served the same purpose * as it's parent's 'thank_you_page()', which is to update the transaction (but not the payment * because in this case no payment has been made) * @global type $EE_Session * @param EE_Transaction * @return void */ public function thank_you_page_logic(EE_Transaction $transaction) { do_action('AHEE_log', __FILE__, __FUNCTION__, ''); //check for an existing payment from this gateway $payments = $this->_PAY->get_all(array(array('PAY_gateway' => $this->gateway(), 'TXN_ID' => $transaction->ID()))); //if it already exists, short-circuit updating the transaction if (empty($payments)) { $this->update_transaction_with_payment($transaction, null); $transaction->save(); } //createa hackey payment object, but dont save it $payment = EE_Payment::new_instance(array('TXN_ID' => $transaction->ID(), 'STS_ID' => EEM_Payment::status_id_pending, 'PAY_timestamp' => current_time('timestamp'), 'PAY_amount' => $transaction->total(), 'PAY_gateway' => $this->_gateway_name)); do_action('AHEE_EE_Gateway__update_transaction_with_payment__done', $transaction, $payment); parent::thank_you_page_logic($transaction); }
/** * Called by client code to tell the gateway that if it wants to change * the transaction or line items or registrations related to teh payment it already * processed (we think, but possibly not) that now's the time to do it. * It is expected that gateways will store any info they need for this on the PAY_details, * or maybe an extra meta value * @param EE_Payment $payment * @return void */ public function update_txn_based_on_payment($payment) { if ($this->_gateway instanceof EE_Gateway) { $this->_gateway->update_txn_based_on_payment($payment); } }
/** * Handles the gateway-specific logic when displaying the payment page.. * @global type $EE_Session * @param EE_Transaction $transaction * @return string */ public function thank_you_page_logic(EE_Transaction $transaction) { //check that we've received an IPN for this payment, otherwise consider this the IPN $this->_EEM_Gateways->handle_ipn_for_transaction($transaction); parent::thank_you_page_logic($transaction); }
/** * @return EE_Offsite_Gateway */ public function __construct() { $this->_supports_receiving_refunds = true; parent::__construct(); }
/** * @return EE_Onsite_Gateway */ public function __construct() { $this->_supports_sending_refunds = TRUE; parent::__construct(); }