[cvs] [Wiki] changed: Project/Horde_Payment

Duck duck at obala.net
Sun Nov 30 19:21:25 UTC 2008


duck  Sun, 30 Nov 2008 14:21:25 -0500

Modified page: http://wiki.horde.org/Project/Horde_Payment
New Revision:  1.7
Change log:  error cheking

@@ -48,12 +48,20 @@
  $params = array(); // Optional: Additional payment parameters, like  
user details (name, address etc..)

  // Check if any authorization method exits and is linked to this
  $authorization_methods = $registry->call('payment/getMethods', array($app));
+if ($authorization_methods instanceof PEAR_Error) {
+    echo sprintf(_("Authorization error. %s"),  
$authorization_methods->getMessage());
+    exit;
+}

  // Push an paymnet authorization request
  $authorizationID = $registry->call('payment/authorizationRequest',
                                      array($app, $transaction_id,  
$total, $params));
+if ($authorizationID instanceof PEAR_Error) {
+    echo sprintf(_("Authorization error. %s"),  
$authorizationID->getMessage());
+    exit;
+}

  // Redirect to paymnet system
  // $redirect_url = $registry->link('payment/show', array('id' =>  
$transaction_id, 'module' => $app));
  $redirect_url = $registry->link('payment/show', array('id' =>  
$authorizationID));


More information about the cvs mailing list