if ( $payment_results['error'] ) { // an error at this stage isn't meaningful to the user $error = 'Internal error communicating with payment processor.'; } elseif ( isset($payment_results['url']) ) { $url = $payment_results['url']; ?>