Definition at line 32 of file Abstract.php.
getAmount | ( | ) |
Total value of the shopping cart
Includes taxes, shipping costs, discount, etc.
Definition at line 283 of file Abstract.php.
00284 { 00285 return $this->getSessionData('amount'); 00286 }
getApiErrorUrl | ( | ) |
the page where buyers will go if there are API error
Definition at line 161 of file Abstract.php.
00162 { 00163 return Mage::getUrl($this->getConfigData('api_error_url', 'paypal/express/error')); 00164 }
getApiPassword | ( | ) |
Definition at line 116 of file Abstract.php.
00117 { 00118 return $this->getConfigData('api_password'); 00119 }
getApiSignature | ( | ) |
Definition at line 121 of file Abstract.php.
00122 { 00123 return $this->getConfigData('api_signature'); 00124 }
getApiUsername | ( | ) |
Definition at line 111 of file Abstract.php.
00112 { 00113 return $this->getConfigData('api_username'); 00114 }
getAuthorizationId | ( | ) |
Definition at line 226 of file Abstract.php.
00227 { 00228 return $this->getSessionData('authorization_id'); 00229 }
getButtonSourceDp | ( | ) |
Definition at line 131 of file Abstract.php.
00132 { 00133 return $this->getConfigData('button_source_dp', 'Varien_Cart_DP_US'); 00134 }
getButtonSourceEc | ( | ) |
Definition at line 126 of file Abstract.php.
00127 { 00128 return $this->getConfigData('button_source_ec', 'Varien_Cart_EC_US'); 00129 }
getCancelUrl | ( | ) |
The page where buyers return to when they cancel the payment review on PayPal
Definition at line 181 of file Abstract.php.
00182 { 00183 return Mage::getUrl($this->getConfigData('api_cancel_url', 'paypal/express/cancel')); 00184 }
getCcTypeName | ( | $ | ccType | ) |
Definition at line 330 of file Abstract.php.
00331 { 00332 $types = array('AE'=>Mage::helper('paypal')->__('Amex'), 'VI'=>Mage::helper('paypal')->__('Visa'), 'MC'=>Mage::helper('paypal')->__('MasterCard'), 'DI'=>Mage::helper('paypal')->__('Discover')); 00333 return isset($types[$ccType]) ? $types[$ccType] : false; 00334 }
getCompleteType | ( | ) |
Complete type code (Complete, NotComplete)
Definition at line 251 of file Abstract.php.
00252 { 00253 return $this->getSessionData('complete_type'); 00254 }
getConfigData | ( | $ | key, | |
$ | default = false , |
|||
$ | storeId = null | |||
) |
Definition at line 55 of file Abstract.php.
00056 { 00057 if (!$this->hasData($key)) { 00058 if ($storeId === null && $this->getPayment() instanceof Varien_Object) { 00059 $storeId = $this->getPayment()->getOrder()->getStoreId(); 00060 } 00061 $value = Mage::getStoreConfig('paypal/wpp/'.$key, $storeId); 00062 if (is_null($value) || false===$value) { 00063 $value = $default; 00064 } 00065 $this->setData($key, $value); 00066 } 00067 return $this->getData($key); 00068 }
getCurrencyCode | ( | ) |
Definition at line 294 of file Abstract.php.
00295 { 00296 //return $this->getSessionData('currency_code', 'USD'); 00297 return $this->getSessionData('currency_code', Mage::app()->getStore()->getBaseCurrencyCode()); 00298 }
getDebug | ( | ) |
Definition at line 151 of file Abstract.php.
00152 { 00153 return $this->getConfigData('debug_flag', true); 00154 }
getError | ( | ) |
Definition at line 320 of file Abstract.php.
00321 { 00322 return $this->getSessionData('error'); 00323 }
getPayerId | ( | ) |
Definition at line 236 of file Abstract.php.
00237 { 00238 return $this->getSessionData('payer_id'); 00239 }
getPaymentType | ( | ) |
Has to be one of the following values: Sale or Order or Authorization
Definition at line 266 of file Abstract.php.
00267 { 00268 return $this->getSessionData('payment_type'); 00269 }
getProxyHost | ( | ) |
Definition at line 141 of file Abstract.php.
00142 { 00143 return $this->getConfigData('proxy_host', '127.0.0.1'); 00144 }
getProxyPort | ( | ) |
Definition at line 146 of file Abstract.php.
00147 { 00148 return $this->getConfigData('proxy_port', '808'); 00149 }
getRefundType | ( | ) |
Refund type ('Full', 'Partial')
Definition at line 310 of file Abstract.php.
00311 { 00312 return $this->getSessionData('refund_type'); 00313 }
getReturnUrl | ( | ) |
the page where buyers return to after they are done with the payment review on PayPal
Definition at line 171 of file Abstract.php.
00172 { 00173 return Mage::getUrl($this->getConfigData('api_return_url', 'paypal/express/return')); 00174 }
getSandboxFlag | ( | ) |
Definition at line 106 of file Abstract.php.
00107 { 00108 return $this->getConfigData('sandbox_flag', true); 00109 }
getServerName | ( | ) |
Definition at line 47 of file Abstract.php.
00048 { 00049 if (!$this->hasServerName()) { 00050 $this->setServerName($_SERVER['SERVER_NAME']); 00051 } 00052 return $this->getData('server_name'); 00053 }
getSession | ( | ) |
Definition at line 70 of file Abstract.php.
00071 { 00072 return Mage::getSingleton('paypal/session'); 00073 }
getSessionData | ( | $ | key, | |
$ | default = false | |||
) |
Definition at line 83 of file Abstract.php.
00084 { 00085 if (!$this->hasData($key)) { 00086 $value = $this->getSession()->getData($key); 00087 if ($this->getSession()->hasData($key)) { 00088 $value = $this->getSession()->getData($key); 00089 } else { 00090 $value = $default; 00091 } 00092 $this->setData($key, $value); 00093 } 00094 return $this->getData($key); 00095 }
getToken | ( | ) |
PayPal API token
Definition at line 206 of file Abstract.php.
00207 { 00208 return $this->getSessionData('token'); 00209 }
getTransactionId | ( | ) |
Definition at line 216 of file Abstract.php.
00217 { 00218 return $this->getSessionData('transaction_id'); 00219 }
getUseProxy | ( | ) |
Definition at line 136 of file Abstract.php.
00137 { 00138 return $this->getConfigData('use_proxy', false); 00139 }
getUserAction | ( | ) |
Decide whether to return from Paypal EC before payment was made or after
Definition at line 191 of file Abstract.php.
00192 { 00193 return $this->getSessionData('user_action', self::USER_ACTION_CONTINUE); 00194 }
getUseSession | ( | ) |
Definition at line 75 of file Abstract.php.
00076 { 00077 if (!$this->hasData('use_session')) { 00078 $this->setUseSession(true); 00079 } 00080 return $this->getData('use_session'); 00081 }
setAmount | ( | $ | data | ) |
Definition at line 288 of file Abstract.php.
00289 { 00290 $data = sprintf('%.2f', $data); 00291 return $this->setSessionData('amount', $data); 00292 }
setAuthorizationId | ( | $ | data | ) |
Definition at line 231 of file Abstract.php.
00232 { 00233 return $this->setSessionData('authorization_id', $data); 00234 }
setCompleteType | ( | $ | data | ) |
Definition at line 256 of file Abstract.php.
00257 { 00258 return $this->setSessionData('complete_type', $data); 00259 }
setCurrencyCode | ( | $ | data | ) |
Definition at line 300 of file Abstract.php.
00301 { 00302 return $this->setSessionData('currency_code', $data); 00303 }
setError | ( | $ | data | ) |
Definition at line 325 of file Abstract.php.
00326 { 00327 return $this->setSessionData('error', $data); 00328 }
setPayerId | ( | $ | data | ) |
Definition at line 241 of file Abstract.php.
00242 { 00243 return $this->setSessionData('payer_id', $data); 00244 }
setPaymentType | ( | $ | data | ) |
Definition at line 271 of file Abstract.php.
00272 { 00273 return $this->setSessionData('payment_type', $data); 00274 }
setRefundType | ( | $ | data | ) |
Definition at line 315 of file Abstract.php.
00316 { 00317 return $this->setSessionData('refund_type', $data); 00318 }
setSessionData | ( | $ | key, | |
$ | value | |||
) |
Definition at line 97 of file Abstract.php.
00098 { 00099 if ($this->getUseSession()) { 00100 $this->getSession()->setData($key, $value); 00101 } 00102 $this->setData($key, $value); 00103 return $this; 00104 }
setToken | ( | $ | data | ) |
Definition at line 211 of file Abstract.php.
00212 { 00213 return $this->setSessionData('token', $data); 00214 }
setTransactionId | ( | $ | data | ) |
Definition at line 221 of file Abstract.php.
00222 { 00223 return $this->setSessionData('transaction_id', $data); 00224 }
setUserAction | ( | $ | data | ) |
Definition at line 196 of file Abstract.php.
00197 { 00198 return $this->setSessionData('user_action', $data); 00199 }
unsError | ( | ) |
Definition at line 336 of file Abstract.php.
00337 { 00338 return $this->setSessionData('error', null); 00339 }
const COMPLETE = 'Complete' |
Definition at line 41 of file Abstract.php.
const NOTCOMPLETE = 'NotComplete' |
Definition at line 42 of file Abstract.php.
const PAYMENT_TYPE_AUTH = 'Authorization' |
Definition at line 36 of file Abstract.php.
const PAYMENT_TYPE_ORDER = 'Order' |
Definition at line 35 of file Abstract.php.
const PAYMENT_TYPE_SALE = 'Sale' |
Definition at line 34 of file Abstract.php.
const REFUND_TYPE_FULL = 'Full' |
Definition at line 38 of file Abstract.php.
const REFUND_TYPE_PARTIAL = 'Partial' |
Definition at line 39 of file Abstract.php.
const USER_ACTION_COMMIT = 'commit' |
Definition at line 44 of file Abstract.php.
const USER_ACTION_CONTINUE = 'continue' |
Definition at line 45 of file Abstract.php.