Class Mage_Paypal_Model_Api_Standard

Description

PayPal Standard checkout request API

Located in /Paypal/Model/Api/Standard.php (line 30)

Varien_Object
   |
   --Mage_Paypal_Model_Api_Abstract
      |
      --Mage_Paypal_Model_Api_Standard
Variable Summary
Method Summary
void debugRequest (array $request)
string getBusinessAccount ()
string getPaymentAction ()
void _applyCountryWorkarounds ( &$request, array $request)
true|null _exportLineItems ( &$request, [int $i = 1], array $request)
void _importAddress ( &$request, array $request)
Variables
array $_addressMap = array(
'city' => 'city',
'country' => 'country_id',
'email' => 'email',
'first_name' => 'firstname',
'last_name' => 'lastname',
'zip' => 'postcode',
'state' => 'region',
'address1' => 'street',
'address2' => 'street2',
)
(line 110)

Address export to request map

  • access: protected
array $_commonRequestFields = array(
'business', 'invoice', 'currency_code', 'paymentaction', 'return', 'cancel_return', 'notify_url', 'bn',
'page_style', 'cpp_header_image', 'cpp_headerback_color', 'cpp_headerborder_color', 'cpp_payflow_color',
'amount', 'shipping', 'tax', 'discount_amount', 'item_name',
)
(line 72)

Interface for common and "aggregated order" specific fields

  • access: protected
array $_debugReplacePrivateDataKeys = array('business') (line 83)

Fields that should be replaced in debug with '***'

  • access: protected

Redefinition of:
Mage_Paypal_Model_Api_Abstract::$_debugReplacePrivateDataKeys
Fields that should be replaced in debug with '***'
mixed $_exportToRequestFilters = array(
'amount' => '_filterAmount',
'shipping' => '_filterAmount',
'tax' => '_filterAmount',
'discount_amount' => '_filterAmount',
)
(line 61)
  • access: protected

Redefinition of:
Mage_Paypal_Model_Api_Abstract::$_exportToRequestFilters
Filter callbacks for exporting $this data to API call
array $_globalMap = array(
// commands
'business' => 'business_account',
'notify_url' => 'notify_url',
'return' => 'return_url',
'cancel_return' => 'cancel_url',
'bn' => 'build_notation_code',
'paymentaction' => 'payment_action',
// payment
'invoice' => 'order_id',
'currency_code' => 'currency_code',
'amount' => 'amount',
'shipping' => 'shipping_amount',
'tax' => 'tax_amount',
'discount_amount' => 'discount_amount',
// misc
'item_name' => 'cart_summary',
// page design settings
'page_style' => 'page_style',
'cpp_header_image' => 'hdrimg',
'cpp_headerback_color' => 'hdrbackcolor',
'cpp_headerborder_color' => 'hdrbordercolor',
'cpp_payflow_color' => 'payflowcolor',
// 'cs' => '', // TODO
)
(line 36)

Global interface map and export filters

  • access: protected

Redefinition of:
Mage_Paypal_Model_Api_Abstract::$_globalMap
Global private to public interface map
mixed $_lineItemExportItemsFilters = array(
'qty' => '_filterQty'
)
(line 102)
  • access: protected

Redefinition of:
Mage_Paypal_Model_Api_Abstract::$_lineItemExportItemsFilters
mixed $_lineItemExportItemsFormat = array(
'id' => 'item_number_%d',
'name' => 'item_name_%d',
'qty' => 'quantity_%d',
'amount' => 'amount_%d',
)
(line 95)
  • access: protected

Redefinition of:
Mage_Paypal_Model_Api_Abstract::$_lineItemExportItemsFormat
Line items export to request mapping settings
array $_lineItemTotalExportMap = array(
Mage_Paypal_Model_Cart::TOTAL_SUBTOTAL => 'amount',
Mage_Paypal_Model_Cart::TOTAL_DISCOUNT => 'discount_amount',
Mage_Paypal_Model_Cart::TOTAL_TAX => 'tax',
Mage_Paypal_Model_Cart::TOTAL_SHIPPING => 'shipping',
)
(line 89)

Line items export mapping settings

  • access: protected

Redefinition of:
Mage_Paypal_Model_Api_Abstract::$_lineItemTotalExportMap

Inherited Variables

Inherited from Mage_Paypal_Model_Api_Abstract

Mage_Paypal_Model_Api_Abstract::$_cart
Mage_Paypal_Model_Api_Abstract::$_config
Mage_Paypal_Model_Api_Abstract::$_importFromRequestFilters
Mage_Paypal_Model_Api_Abstract::$_recurringPaymentProfiles
Mage_Paypal_Model_Api_Abstract::$_shippingOptionsExportItemsFormat
Methods
debugRequest (line 180)
  • deprecated: after 1.4.1.0
  • access: public
void debugRequest (array $request)
  • array $request
getBusinessAccount (line 161)

Merchant account email getter

  • access: public
string getBusinessAccount ()

Redefinition of:
Mage_Paypal_Model_Api_Abstract::getBusinessAccount()
PayPal merchant email getter
getPaymentAction (line 170)

Payment action getter

  • access: public
string getPaymentAction ()

Redefinition of:
Mage_Paypal_Model_Api_Abstract::getPaymentAction()
Payment action getter
getStandardCheckoutRequest (line 127)

Generate PayPal Standard checkout request fields

Depending on whether there are cart line items set, will aggregate everything or display items specifically Shipping amount in cart line items is implemented as a separate "fake" line item

  • access: public
void getStandardCheckoutRequest ()
_applyCountryWorkarounds (line 246)

Adopt specified request array to be compatible with Paypal Puerto Rico should be as state of USA and not as a country

  • access: protected
void _applyCountryWorkarounds ( &$request, array $request)
  • array $request
  • &$request
_exportLineItems (line 194)

Add shipping total as a line item.

For some reason PayPal ignores shipping total variables exactly when line items is enabled Note that $i = 1

  • access: protected
true|null _exportLineItems ( &$request, [int $i = 1], array $request)
  • array $request
  • int $i
  • array &$request

Redefinition of:
Mage_Paypal_Model_Api_Abstract::_exportLineItems()
Prepare line items request
_importAddress (line 210)

Import address object, if set, to the request

  • access: protected
void _importAddress ( &$request, array $request)
  • array $request
  • &$request

Inherited Methods

Inherited From Mage_Paypal_Model_Api_Abstract

Mage_Paypal_Model_Api_Abstract::addRecurringPaymentProfiles()
Mage_Paypal_Model_Api_Abstract::export()
Mage_Paypal_Model_Api_Abstract::getApiCertificate()
Mage_Paypal_Model_Api_Abstract::getApiPassword()
Mage_Paypal_Model_Api_Abstract::getApiSignature()
Mage_Paypal_Model_Api_Abstract::getApiUsername()
Mage_Paypal_Model_Api_Abstract::getBuildNotationCode()
Mage_Paypal_Model_Api_Abstract::getBusinessAccount()
Mage_Paypal_Model_Api_Abstract::getDebug()
Mage_Paypal_Model_Api_Abstract::getDebugFlag()
Mage_Paypal_Model_Api_Abstract::getFraudManagementFiltersEnabled()
Mage_Paypal_Model_Api_Abstract::getHdrbackcolor()
Mage_Paypal_Model_Api_Abstract::getHdrbordercolor()
Mage_Paypal_Model_Api_Abstract::getHdrimg()
Mage_Paypal_Model_Api_Abstract::getLocaleCode()
Mage_Paypal_Model_Api_Abstract::getPageStyle()
Mage_Paypal_Model_Api_Abstract::getPayflowcolor()
Mage_Paypal_Model_Api_Abstract::getPaymentAction()
Mage_Paypal_Model_Api_Abstract::getProxyHost()
Mage_Paypal_Model_Api_Abstract::getProxyPort()
Mage_Paypal_Model_Api_Abstract::getUseCertAuthentication()
Mage_Paypal_Model_Api_Abstract::getUseProxy()
Mage_Paypal_Model_Api_Abstract::import()
Mage_Paypal_Model_Api_Abstract::setConfigObject()
Mage_Paypal_Model_Api_Abstract::setPaypalCart()
Mage_Paypal_Model_Api_Abstract::_buildQuery()
Mage_Paypal_Model_Api_Abstract::_debug()
Mage_Paypal_Model_Api_Abstract::_exportLineItems()
Mage_Paypal_Model_Api_Abstract::_exportShippingOptions()
Mage_Paypal_Model_Api_Abstract::_exportToRequest()
Mage_Paypal_Model_Api_Abstract::_filterAmount()
Mage_Paypal_Model_Api_Abstract::_filterBool()
Mage_Paypal_Model_Api_Abstract::_filterInt()
Mage_Paypal_Model_Api_Abstract::_filterQty()
Mage_Paypal_Model_Api_Abstract::_getDataOrConfig()
Mage_Paypal_Model_Api_Abstract::_importFromResponse()
Mage_Paypal_Model_Api_Abstract::_importStreetFromAddress()
Mage_Paypal_Model_Api_Abstract::_lookupRegionCodeFromAddress()

Documentation generated on Fri, 11 Feb 2011 17:13:08 +0200 by phpDocumentor 1.4.3