WC_Gateway_Paypal_IPN_Handler::validate_transaction_type( string $txn_type )

Check for a valid transaction type.


Description Description


Parameters Parameters

$txn_type

(Required) Transaction type.


Top ↑

Source Source

File: includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php

	protected function validate_transaction_type( $txn_type ) {
		$accepted_types = array( 'cart', 'instant', 'express_checkout', 'web_accept', 'masspay', 'send_money', 'paypal_here' );

		if ( ! in_array( strtolower( $txn_type ), $accepted_types, true ) ) {
			WC_Gateway_Paypal::log( 'Aborting, Invalid type:' . $txn_type );
			exit;
		}
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.