WordPress.org

Plugin Directory

Changeset 608431


Ignore:
Timestamp:
10/05/12 11:19:28 (19 months ago)
Author:
kovshenin
Message:

Better logging for failed payments, especially timeouts.

Location:
camptix/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • camptix/trunk/addons/payment-paypal.php

    r608404 r608431  
    345345 
    346346            } else { 
     347                $payment_data = array( 
     348                    'error' => 'Error during DoExpressCheckoutPayment', 
     349                    'data' => $request, 
     350                ); 
    347351                $this->log( 'Error during DoExpressCheckoutPayment.', null, $request ); 
    348                 return $this->payment_result( $payment_token, $camptix::PAYMENT_STATUS_FAILED ); 
     352                return $this->payment_result( $payment_token, $camptix::PAYMENT_STATUS_FAILED, $payment_data ); 
    349353            } 
    350354        } else { 
     355            $payment_data = array( 
     356                'error' => 'Error during GetExpressCheckoutDetails', 
     357                'data' => $request, 
     358            ); 
    351359            $this->log( 'Error during GetExpressCheckoutDetails.', null, $request ); 
    352             return $this->payment_result( $payment_token, $camptix::PAYMENT_STATUS_FAILED ); 
     360            return $this->payment_result( $payment_token, $camptix::PAYMENT_STATUS_FAILED, $payment_data ); 
    353361        } 
    354362 
  • camptix/trunk/camptix.php

    r608426 r608431  
    55165516            } 
    55175517 
    5518             $this->log( sprintf( 'Payment result for %s.', $transaction_id ), $attendee->ID, $transaction_details ); 
     5518            $this->log( sprintf( 'Payment result for %s.', $transaction_id ), $attendee->ID, $data ); 
    55195519 
    55205520            if ( $old_post_status != $attendee->post_status ) { 
     
    55225522                $this->log( sprintf( 'Attendee status has been changed to %s', $attendee->post_status ), $attendee->ID ); 
    55235523            } else { 
    5524  
     5524                $this->log( sprintf( 'Received payment result for %s but status has not changed.', $transaction_id ), $attendee->ID ); 
    55255525            } 
    55265526        } 
     
    55325532        // If the status hasn't changed, there's nothing much we can do here. 
    55335533        if ( ! $status_changed ) { 
    5534             $this->log( sprintf( 'Received payment result for %s but status has not changed.', $transaction_id ) ); 
    5535  
    55365534            if ( in_array( $to_status, array( 'pending', 'publish' ) ) ) { 
    55375535                // Show the purchased tickets. 
Note: See TracChangeset for help on using the changeset viewer.