[Wiki] changed: Project/Horde_Payment

Duck <[email protected]>
Newsgroups gmane.comp.horde.cvs
Message-ID <[email protected]>
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));

--
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.