Class Gateway

Description

This class encapsulates all of the functions for interacting with PayPal Pro. Requires PHP 5.

  • author: Richard Sharp
  • version: 1.0
  • copyright: 2011
 
	
			
Variable Summary
string $Address
decimal $Amount
string $ApprovalCode
string $CancelURL
string $CardNumber
string $City
string $Country
string $CurrencyCode
string $Custom
string $Description
string $Email
string $FirstName
string $IPN
string $LastError
string $LastName
string $LastRequest
string $LastResponse
string $Note
string $PayerID
string $Phone
string $ReturnURL
string $SecurityCode
decimal $Shipping
string $State
decimal $SubTotal
decimal $Tax
bool $Test
string $Token
string $Zip
Method Summary
void __construct (string $GatewayMerchantID, string $GatewayPassword, string $GatewaySignature)
bool GetExpressCheckoutDetails (string $Token)
Variables
string $Address = "" (line 18)

Gets or sets the customer's address.

  • access: public
decimal $Amount (line 24)

Sets the ammount to charge.

  • access: public
string $ApprovalCode = "" (line 219)

Gets the returned approval code.

  • access: public
string $CancelURL = "" (line 30)

Sets the URL to return to if the customer clicks the cancel link in PayPal.

  • access: public
string $CardNumber = "" (line 36)

Sets the credit card number.

  • access: public
string $City = "" (line 42)

Gets or sets the customer's city.

  • access: public
string $Country = "US" (line 48)

Gets or sets the customer's country.

  • access: public
string $CurrencyCode = "USD" (line 54)

Sets the currency code. For a list of valid currency codes, see: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes

  • access: public
string $Custom = "" (line 60)

Gets or sets the custom order information.

  • access: public
string $Description = "" (line 66)

Sets the order description.

  • access: public
string $Email = "" (line 72)

Gets or sets the customer's email address.

  • access: public
int $ExpirationMonth = "" (line 78)

Sets the credit card expiration month.

  • access: public
int $ExpirationYear = "" (line 84)

Sets the credit card expiration year.

  • access: public
string $FirstName = "" (line 90)

Gets or sets the customer's first name.

  • access: public
string $GatewayMerchantID = "" (line 96)

Sets the client's PayPal API Username.

  • access: public
string $GatewayPassword = "" (line 102)

The client's PayPal API Password

  • access: public
string $GatewaySignature = "" (line 108)

The client's PayPal API Signature

  • access: public
string $InvoiceNumber = "" (line 114)

Gets or sets the invoice number.

  • access: public
string $IPN = "" (line 120)

Sets the URL for Instant Payment Notifications.

  • access: public
string $LastError = "" (line 225)

Gets the last error that ocurred.

  • access: public
string $LastName = "" (line 126)

Gets or sets the customer's last name.

  • access: public
string $LastRequest = "" (line 231)

Gets the last request that was sent to PayPal in raw format.

  • access: public
string $LastResponse = "" (line 237)

Gets the last response returned from PayPal in raw format.

  • access: public
string $Note = "" (line 132)

Gets any special notes entered by the client in their PayPal account, returned from the GetExpressCheckoutDetails function.

  • access: public
string $PayerID = "" (line 138)

Gets or sets the customer's PayPal Payer ID.

  • access: public
string $Phone = "" (line 144)

Gets or sets the customer's phone number.

  • access: public
string $ResponseReason = "" (line 243)

Gets the reason for the last response.

  • access: public
string $ReturnURL = "" (line 150)

Sets the URL to return to from PayPal once the customer completes the transaction.

  • access: public
string $SecurityCode = "" (line 156)

Sets the credit card security code (CVV2).

  • access: public
decimal $Shipping (line 162)

Sets the shipping amount of the order.

  • access: public
bool $ShowShipping = true (line 168)

Sets whether or not to show the shipping fields in PayPal.

  • access: public
string $State = "" (line 174)

Gets or sets the customer's state.

  • access: public
decimal $SubTotal (line 180)

Sets the sub-total of the order.

  • access: public
decimal $Tax (line 186)

Sets the sales tax amount.

  • access: public
bool $Test = false (line 192)

Sets whether or not to use test mode. If true, the transaction will be sent to the PayPal sandbox.

  • access: public
string $Token = "" (line 198)

Gets or sets the Toekn used by PayPal for express checkout.

  • access: public
string $TransactionID = "" (line 204)

Gets or sets the transaction ID.

  • access: public
string $Zip = "" (line 210)

Gets or sets the customer's zip/postal code.

  • access: public
Methods
Constructor __construct (line 274)

Constructor for the class.

void __construct (string $GatewayMerchantID, string $GatewayPassword, string $GatewaySignature)
  • string $GatewayMerchantID: The client's API Username with PayPal.
  • string $GatewayPassword: The client's API Password with PayPal.
  • string $GatewaySignature: The client's API Signature with PayPal.
CompleteExpressCheckout (line 398)

Completes a previously begun Express Checkout transaction. Returns true on success, false on failure.

  • access: public
bool CompleteExpressCheckout ()
GetExpressCheckoutDetails (line 471)

Retrieves information from PayPal regarding the current express checkout user's account. Returns true on success, false on failure.

  • access: public
bool GetExpressCheckoutDetails (string $Token)
  • string $Token: The Token received from PayPal. The Token is originally generated by the SetExpressCheckout method, but is sent back in a GET variable from PayPal upon return. Returns true on success, otherwise false.
ProcessTransaction (line 285)

Processes a direct credit card payment. Returns true on successful payment, otherwise false.

  • access: public
bool ProcessTransaction ()
SetExpressCheckout (line 528)

Notifies PayPal to begin an Express checkout, and generates the token. Returns true on successful payment, otherwise false.

  • access: public
bool SetExpressCheckout ()

Documentation generated on Wed, 26 Jan 2011 15:24:44 -0700 by phpDocumentor 1.4.3