[ Index ]
 

Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/includes/modules/payment/paypal/ -> paypal_curl.php (sommaire)

paypal_curl.php communications class for Paypal Express Checkout / Website Payments Pro / Payflow Pro payment methods

Copyright: Copyright 2003-2007 Zen Cart Development Team
Copyright: Portions Copyright 2003 osCommerce
License: http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
Version: $Id: paypal_curl.php 6528 2007-06-25 23:25:27Z drbyte $
Poids: 619 lignes (24 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

paypal_curl:: (22 méthodes):
  paypal_curl()
  SetExpressCheckout()
  GetExpressCheckoutDetails()
  DoExpressCheckoutPayment()
  DoDirectPayment()
  RefundTransaction()
  DoVoid()
  DoAuthorization()
  DoReauthorization()
  DoCapture()
  GetTransactionDetails()
  TransactionSearch()
  setParam()
  setCurlOption()
  _request()
  _buildNameValueList()
  _parseNameValueList()
  _logTransaction()
  _sanitizeLog()
  log()
  _getMicroseconds()
  _getElapsed()


Classe: paypal_curl  - X-Ref

PayPal NVP (v2.3) and Payflow Pro (v4 HTTP API) implementation via cURL.

paypal_curl($params = array()   X-Ref
Constructor. Sets up communication infrastructure.


SetExpressCheckout($amount, $returnUrl, $cancelUrl, $optional = array()   X-Ref
SetExpressCheckout

Prepares to send customer to PayPal site so they can
log in and choose their funding source and shipping address.

The token returned to this function is passed to PayPal in
order to link their PayPal selections to their cart actions.

GetExpressCheckoutDetails($token, $optional = array()   X-Ref
GetExpressCheckoutDetails

When customer returns from PayPal site, this retrieves their payment/shipping data for use in Zen Cart

DoExpressCheckoutPayment($token, $payerId, $amount, $optional = array()   X-Ref
DoExpressCheckoutPayment

Completes the sale using PayPal as payment choice

DoDirectPayment($amount, $cc, $cvv2 = '', $exp, $fname = null, $lname = null, $cc_type, $options = array()   X-Ref
DoDirectPayment
Sends CC information to gateway for processing.

Requires Website Payments Pro or Payflow Pro as merchant gateway.

PAYMENTACTION = Authorization (auth/capt) or Sale (final)

RefundTransaction($oID, $txnID, $amount = 'Full', $note = '')   X-Ref
RefundTransaction

Used to refund all or part of a given transaction

DoVoid($txnID, $note = '')   X-Ref
DoVoid

Used to void a previously authorized transaction

DoAuthorization($txnID, $amount = 0, $currency = 'USD', $entity = 'Order')   X-Ref
DoAuthorization

Used to authorize part of a previously placed order which was initiated as authType of Order

DoReauthorization($txnID, $amount = 0, $currency = 'USD')   X-Ref
DoReauthorization

Used to reauthorize a previously-authorized order which has expired

DoCapture($txnID, $amount = 0, $currency = 'USD', $captureType = 'Complete', $invNum = '', $note = '')   X-Ref
DoCapture

Used to capture part or all of a previously placed order which was only authorized

GetTransactionDetails($txnID)   X-Ref
GetTransactionDetails

Used to read data from PayPal for a given transaction

TransactionSearch($startdate, $txnID = '', $email = '', $options)   X-Ref
TransactionSearch

Used to read data from PayPal for specified transaction criteria

setParam($name, $value)   X-Ref
Set a parameter as passed.


setCurlOption($name, $value)   X-Ref
Set cURL options.


_request($values, $operation, $requestId = null)   X-Ref
Send a request to endpoint.


_buildNameValueList($pairs)   X-Ref
Take an array of name-value pairs and return a properly
formatted list. Enforces the following rules:

- Names must be uppercase, all characters must match [A-Z].
- Values cannot contain quotes.
- If values contain & or =, the name has the length appended to
it in brackets (NAME[4] for a 4-character value.

If any of the "cannot" conditions are violated the function
returns false, and the caller must abort and not proceed with
the transaction.

_parseNameValueList($string)   X-Ref
Take a name/value response string and parse it into an
associative array. Doesn't handle length tags in the response
as they should not be present.


_logTransaction($operation, $elapsed, $response, $errors)   X-Ref
Log the current transaction depending on the current log level.

param: string $operation  The operation called.
param: integer $elapsed   Microseconds taken.
param: object $response   The response.

_sanitizeLog($log)   X-Ref
Strip sensitive information (passwords, credit card numbers, cvv2 codes) from requests/responses.

param: mixed $log  The log to sanitize.
return: string  The sanitized (and string-ified, if necessary) log.

log($message, $token = '')   X-Ref
Pas de description

_getMicroseconds()   X-Ref
Return the current time including microseconds.

return: integer  Current time with microseconds.

_getElapsed($start)   X-Ref
Return the difference between now and $start in microseconds.

param: integer $start  Start time including microseconds.
return: integer  Number of microseconds elapsed since $start



Généré le : Mon Nov 26 16:45:43 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics