Class Mage_Paypal_Model_Api_Standard
PayPal Standard checkout request API
- Varien_Object
- Mage_Paypal_Model_Api_Abstract
- Mage_Paypal_Model_Api_Standard
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Located at code/core/Mage/Paypal/Model/Api/Standard.php
public
|
#
getStandardCheckoutRequest( )
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 |
public
string
|
|
public
string
|
|
protected
true|null
|
#
_exportLineItems( array & $request, integer $i = 1 )
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 |
protected
|
|
protected
|
#
_applyCountryWorkarounds( array & $request )
Adopt specified request array to be compatible with Paypal Puerto Rico should be as state of USA and not as a country |
protected
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
'lc' => 'locale',
) |
#
Global interface map and export filters |
protected
array
|
$_exportToRequestFilters | array(
'amount' => '_filterAmount',
'shipping' => '_filterAmount',
'tax' => '_filterAmount',
'discount_amount' => '_filterAmount',
) |
#
Filter callbacks for exporting $this data to API call |
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', 'lc',
) |
#
Interface for common and "aggregated order" specific fields |
protected
array
|
$_debugReplacePrivateDataKeys | array('business') |
#
Fields that should be replaced in debug with '***' |
protected
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 items export mapping settings |
protected
array
|
$_lineItemExportItemsFormat | array(
'id' => 'item_number_%d',
'name' => 'item_name_%d',
'qty' => 'quantity_%d',
'amount' => 'amount_%d',
) |
#
Line items export to request mapping settings |
protected
array
|
$_lineItemExportItemsFilters | array(
'qty' => '_filterQty'
) |
|
protected
array
|
$_addressMap | array(
'city' => 'city',
'country' => 'country_id',
'email' => 'email',
'first_name' => 'firstname',
'last_name' => 'lastname',
'zip' => 'postcode',
'state' => 'region',
'address1' => 'street',
'address2' => 'street2',
) |
#
Address export to request map |
$_cart,
$_config,
$_importFromRequestFilters,
$_recurringPaymentProfiles,
$_shippingOptionsExportItemsFormat
|