Class PayPalTypes

Description

This class contains the list of all the Data Types used when contacting the Paypal webservice

Located in /paypal_types.php (line 29)


	
			
Method Summary
 static AddressType AddressType ([string $Name = ''], [string $Street1 = ''], [string $Street2 = ''], [string $CityName = ''], [string $StateOrProvince = ''], [string $PostalCode = ''], [string $Country = ''], [string $Phone = ''])
 static BasicAmountType BasicAmountType ([string $amount = '0.00'], [string $currencyID = 'USD'])
 static CreditCardDetailsType CreditCardDetailsType (string $CreditCardType, string $CreditCardNumber, int $ExpMonth, int $ExpYear, PayerInfoType $CardOwner, [string $CVV2 = ''])
 static string dateTimeType ([integer $timeStamp = 0])
 static DoDirectPaymentRequestDetailsType DoDirectPaymentRequestDetailsType (string $PaymentAction, PaymentDetailsType $PaymentDetails, CreditCardDetailsType $CreditCard, string $IPAddress, string $MerchantSessionId)
 static DoExpressCheckoutPaymentRequestDetailsType DoExpressCheckoutPaymentRequestDetailsType (string $PaymentAction, string $Token, string $PayerID, PaymentDetailsType $PaymentDetails)
 static PayerInfoType PayerInfoType ([EmailAddressType $Payer = ''], [string $PayerID = ''], [string $PayerStatus = 'verified'], PersonNameType $PayerName, [string $PayerCountry = 'US'], [string $PayerBusiness = ''], AddressType $Address, [string $ContactPhone = ''])
 static PaymentDetailsItemType PaymentDetailsItemType ([string $Name = ''], [string $Number = ''], [integer $Quantity = 1], [BasicAmountType $Tax = ''], [BasicAmountType $Amount = ''], [string $CurrencyID = 'USD'])
 static PaymentDetailsType PaymentDetailsType (BasicAmountType $OrderTotal, [BasicAmountType $ItemTotal = '0.00'], [BasicAmountType $ShippingTotal = '0.00'], [BasicAmountType $HandlingTotal = '0.00'], [BasicAmountType $TaxTotal = '0.00'], [string $OrderDescription = ''], [string $Custom = ''], [string $InvoiceID = ''], [string $ButtonSource = ''], [string $NotifyURL = ''], [AddressType $ShipToAddress = ''], [PaymentDetailsItemType $PaymentDetailsItem = array()], [string $CurrencyID = 'USD'])
 static PersonNameType PersonNameType ([string $Salutation = ''], [string $FirstName = ''], [string $MiddleName = ''], [string $LastName = ''], [string $Suffix = ''])
 static SetExpressCheckoutRequestDetailsType SetExpressCheckoutRequestDetailsType (BasicAmountType $OrderTotal, string $ReturnURL, string $CancelURL, string $PaymentAction, [ $currencyID = 'USD'])
 static TransactionSearchRequestType TransactionSearchRequestType (integer $StartDate, [intefer $EndDate = 0], [string $PayerEmail = ''], [string $ReceiverEmail = ''], [string $ReceiptID = ''], [string $TransactionID = ''], [string $PayerName = ''], [string $AuctionItemNumber = ''], [string $InvoiceID = ''], [string $CardNumber = ''], [string $TransactionClass = ''], [BasicAmountType $Amount = ''], [string $CurrencyCode = ''], [string $Status = ''], [ $currencyID = 'USD'])
 static UserIdPasswordType UserIdPasswordType ([string $Username = ''], [string $Password = ''], [string $Signature = ''], [string $Subject = ''])
Methods
static AddressType (line 67)

Prepares the AddressType

This method is used to generate the AddressType for Payment information.

AddressType AddressType ([string $Name = ''], [string $Street1 = ''], [string $Street2 = ''], [string $CityName = ''], [string $StateOrProvince = ''], [string $PostalCode = ''], [string $Country = ''], [string $Phone = ''])
  • string $Name
  • string $Street1
  • string $Street2
  • string $CityName
  • string $StateOrProvince
  • string $PostalCode
  • string $Country
  • string $Phone
static BasicAmountType (line 44)

Formats the Amount according to the BasicAmountType

This method creates a classical example of an element that has an attribute. For example <element attribute1='attr1' attribute2='attr2'>value</element> will be created as array('_' => 'value', 'attr1' => 'attribute1', 'attr2' => 'attribute2');

BasicAmountType BasicAmountType ([string $amount = '0.00'], [string $currencyID = 'USD'])
  • string $amount
  • string $currencyID
static CreditCardDetailsType (line 170)

Makes the CreditCardDetailsType

This is a very essential data type because it has to be formatted correctly. This method is used to generate an array that is going to be part of the payment details submitted to paypal.

CreditCardDetailsType CreditCardDetailsType (string $CreditCardType, string $CreditCardNumber, int $ExpMonth, int $ExpYear, PayerInfoType $CardOwner, [string $CVV2 = ''])
  • string $CreditCardType: Visa,MasterCard,Amex,Discover,Solo,Switch
  • string $CreditCardNumber
  • int $ExpMonth
  • int $ExpYear
  • PayerInfoType $CardOwner
  • string $CVV2
static dateTimeType (line 361)

Returns the date in the ISO 8601 format

Generates the ISO 8601 format using the UNIX timestamp supplied. Like 2007-02-02T01:36:06-05:00 which is basically the year, month, day, 24-hour format, minutes, seconds and time zone like -05:00 for EST

string dateTimeType (integer $timeStamp)
  • integer $timeStamp: the Unix Timestamp
static DoDirectPaymentRequestDetailsType (line 271)

Prepares the DoDirectPaymentRequestDetailsType

This basically returns a multi-dimensional array with the Payment Action. Credit Card information, User IP address and the merchant's session id.

DoDirectPaymentRequestDetailsType DoDirectPaymentRequestDetailsType (string $PaymentAction, PaymentDetailsType $PaymentDetails, CreditCardDetailsType $CreditCard, string $IPAddress, string $MerchantSessionId)
  • string $PaymentAction: This could be a Sale or Order.
  • PaymentDetailsType $PaymentDetails
  • CreditCardDetailsType $CreditCard
  • string $IPAddress
  • string $MerchantSessionId
static DoExpressCheckoutPaymentRequestDetailsType (line 314)

Makes the DoExpressCheckoutPaymentRequestDetailsType

This returns the Payment action, Token value, Payer ID and Payment details as a multi-dimensional array.

DoExpressCheckoutPaymentRequestDetailsType DoExpressCheckoutPaymentRequestDetailsType (string $PaymentAction, string $Token, string $PayerID, PaymentDetailsType $PaymentDetails)
  • string $PaymentAction: Order or Sale
  • string $Token
  • string $PayerID
  • PaymentDetailsType $PaymentDetails
static PayerInfoType (line 133)

Prepares the PayerInfoType

The PayerInfoType uses the AddressType and PersonNameType to generate a multi-dimensional array that will in turn be used as part of a SOAP message.

PayerInfoType PayerInfoType ([EmailAddressType $Payer = ''], [string $PayerID = ''], [string $PayerStatus = 'verified'], PersonNameType $PayerName, [string $PayerCountry = 'US'], [string $PayerBusiness = ''], AddressType $Address, [string $ContactPhone = ''])
  • EmailAddressType $Payer: e.g buyer@gmail.com
  • string $PayerID
  • string $PayerStatus: verified, unverified
  • PersonNameType $PayerName
  • string $PayerCountry
  • string $PayerBusiness
  • AddressType $Address
  • string $ContactPhone
static PaymentDetailsItemType (line 200)

Makes PaymentDetailsItemType

This generates details about a particular payment item. An array is returned which contains the name, quantity and amound of each item added to the payment.

PaymentDetailsItemType PaymentDetailsItemType ([string $Name = ''], [string $Number = ''], [integer $Quantity = 1], [BasicAmountType $Tax = ''], [BasicAmountType $Amount = ''], [string $CurrencyID = 'USD'])
  • string $Name
  • string $Number
  • integer $Quantity
  • BasicAmountType $Tax
  • BasicAmountType $Amount
  • string $CurrencyID
static PaymentDetailsType (line 240)

Creates the PaymentDetailsType

This is a critical part of the DoDirectPayment and DoExpressCheckOutPayment operations. The payment details is an overall summary of the payment to be sent to the paypal web service.

PaymentDetailsType PaymentDetailsType (BasicAmountType $OrderTotal, [BasicAmountType $ItemTotal = '0.00'], [BasicAmountType $ShippingTotal = '0.00'], [BasicAmountType $HandlingTotal = '0.00'], [BasicAmountType $TaxTotal = '0.00'], [string $OrderDescription = ''], [string $Custom = ''], [string $InvoiceID = ''], [string $ButtonSource = ''], [string $NotifyURL = ''], [AddressType $ShipToAddress = ''], [PaymentDetailsItemType $PaymentDetailsItem = array()], [string $CurrencyID = 'USD'])
  • BasicAmountType $OrderTotal
  • BasicAmountType $ItemTotal
  • BasicAmountType $ShippingTotal
  • BasicAmountType $HandlingTotal
  • BasicAmountType $TaxTotal
  • string $OrderDescription
  • string $Custom
  • string $InvoiceID
  • string $ButtonSource
  • string $NotifyURL: Paypal IPN URL
  • AddressType $ShipToAddress
  • PaymentDetailsItemType $PaymentDetailsItem
  • string $CurrencyID
static PersonNameType (line 93)

Prepares the PersonNameType

The person name type is used to format the name information for onward inclusion in the SOAP message.

PersonNameType PersonNameType ([string $Salutation = ''], [string $FirstName = ''], [string $MiddleName = ''], [string $LastName = ''], [string $Suffix = ''])
  • string $Salutation
  • string $FirstName
  • string $MiddleName
  • string $LastName
  • string $Suffix
static SetExpressCheckoutRequestDetailsType (line 293)

Prepares the SetExpressCheckoutRequestDetailsType

This is an array with the Amount, Return URL, Cancellation URL and Payment Action (Sale or Order)

SetExpressCheckoutRequestDetailsType SetExpressCheckoutRequestDetailsType (BasicAmountType $OrderTotal, string $ReturnURL, string $CancelURL, string $PaymentAction, [ $currencyID = 'USD'])
  • BasicAmountType $OrderTotal
  • string $ReturnURL
  • string $CancelURL
  • string $PaymentAction: Sale or Order
  • $currencyID
static TransactionSearchRequestType (line 397)

Generates the TransactionSearchRequestType

Prepares a multi-dimensional array to be used in the search.

  • uses: self::dateTimeType
TransactionSearchRequestType TransactionSearchRequestType (integer $StartDate, intefer $EndDate, [string $PayerEmail = ''], [string $ReceiverEmail = ''], [string $ReceiptID = ''], [string $TransactionID = ''], [string $PayerName = ''], [string $AuctionItemNumber = ''], [string $InvoiceID = ''], [string $CardNumber = ''], [string $TransactionClass = ''], [BasicAmountType $Amount = ''], [string $CurrencyCode = ''], [string $Status = ''], [ $currencyID = 'USD'])
  • integer $StartDate: UNIXTIMESTAMP
  • intefer $EndDate: UNIXTIMESTAMP
  • string $PayerEmail
  • string $ReceiverEmail
  • string $ReceiptID
  • string $TransactionID
  • string $PayerName
  • string $AuctionItemNumber
  • string $InvoiceID
  • string $CardNumber
  • string $TransactionClass
  • BasicAmountType $Amount
  • string $CurrencyCode
  • string $Status
  • $currencyID
static UserIdPasswordType (line 337)

Makes the UserIdPasswordType

This prepares the authentication message to be passed to paypal. It is an array with the Username, Password and Signature of the user. If the payment is being made on behalf of another account then the username of that account has to be passed as the subject.

UserIdPasswordType UserIdPasswordType ([string $Username = ''], [string $Password = ''], [string $Signature = ''], [string $Subject = ''])
  • string $Username
  • string $Password
  • string $Signature
  • string $Subject

Documentation generated on Sat, 03 Feb 2007 20:59:05 -0800 by phpDocumentor 1.3.1