[Wiki] changed: Project/Horde_Payment
Duck <[email protected]>
| Newsgroups | gmane.comp.horde.cvs |
|---|---|
| Message-ID | <[email protected]> |
duck Sun, 30 Nov 2008 14:19:37 -0500 Modified page: http://wiki.horde.org/Project/Horde_Payment New Revision: 1.6 Change log: authorizationRequest @@ -12,9 +12,9 @@ Duck [mailto:[email protected] [email protected]] ++ Code -http://cvs.horde.org/incubator/spread/ +http://cvs.horde.org/incubator/Horde_Payment/ ++ Description A payment processing module encapsulating all communications with various payment interfaces. @@ -37,11 +37,34 @@ * Limit payment methods per application * Virtual host support * Possibility to add a testing process request -+++ authorizationResponse() API example ++++ authorizationRequest() usage example -<?php +<code type="php"> + +$app = $registry->getApp(); // Calling app +$transaction_id = "myID123"; // App internal unique id +$total = 500; // Total requested amount +$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)); + +// Push an paymnet authorization request +$authorizationID = $registry->call('payment/authorizationRequest', + array($app, $transaction_id, $total, $params)); + +// 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)); + +header('Location:' . $redirect_url); +exit; + +</code> + ++++ authorizationResponse() API example <code type="php"> ... -- To unsubscribe, mail: [email protected]