WordPress.org

Plugin Directory

Changeset 621641


Ignore:
Timestamp:
11/06/12 12:09:45 (18 months ago)
Author:
kovshenin
Message:

Bail if the payment method object can not be found during checkout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • camptix/trunk/camptix.php

    r612796 r621641  
    52775277 
    52785278            $payment_method_obj = $this->get_payment_method_by_id( $payment_method ); 
     5279 
     5280            // Bail if a payment method does not exist. 
     5281            if ( ! $payment_method_obj ) { 
     5282                $payment_data = array( 
     5283                    'error' => 'Invalid payment method.', 
     5284                    'data' => $_POST, 
     5285                ); 
     5286 
     5287                $this->payment_result( $payment_token, self::PAYMENT_STATUS_FAILED, $payment_data ); 
     5288                return; 
     5289            } 
     5290 
    52795291            $payment_method_obj->payment_checkout( $payment_token ); 
    52805292 
Note: See TracChangeset for help on using the changeset viewer.