Definition at line 32 of file Abstract.php.
getAmount | ( | ) |
Total value of the shopping cart
Includes taxes, shipping costs, discount, etc.
Definition at line 257 of file Abstract.php.
00258 { 00259 return $this->getSessionData('amount'); 00260 }
getApiErrorUrl | ( | ) |
the page where buyers will go if there are API error
Definition at line 296 of file Abstract.php.
00297 { 00298 return Mage::getUrl($this->getConfigData('api_error_url', 'paypaluk/express/error')); 00299 }
getApiPassword | ( | ) |
Definition at line 115 of file Abstract.php.
00116 { 00117 return $this->getConfigData('pwd'); 00118 }
getApiUrl | ( | ) |
Definition at line 100 of file Abstract.php.
00101 { 00102 return $this->getConfigData('url'); 00103 }
getApiUser | ( | ) |
Definition at line 105 of file Abstract.php.
00106 { 00107 return $this->getConfigData('user'); 00108 }
getApiVendor | ( | ) |
Definition at line 110 of file Abstract.php.
00111 { 00112 return $this->getConfigData('vendor'); 00113 }
getAuthorizationId | ( | ) |
Definition at line 200 of file Abstract.php.
00201 { 00202 return $this->getSessionData('authorization_id'); 00203 }
getButtonSourceDp | ( | ) |
Definition at line 286 of file Abstract.php.
00287 { 00288 return $this->getConfigData('button_source', 'Varien_Cart_DP_UK'); 00289 }
getButtonSourceEc | ( | ) |
Definition at line 281 of file Abstract.php.
00282 { 00283 return $this->getConfigData('button_source', 'Varien_Cart_EC_UK'); 00284 }
getCancelUrl | ( | ) |
The page where buyers return to when they cancel the payment review on PayPal
Definition at line 155 of file Abstract.php.
00156 { 00157 return Mage::getUrl($this->getConfigData('api_cancel_url', 'paypaluk/express/cancel')); 00158 }
getCcTypes | ( | ) |
return all avaialble uk cardtypes
Definition at line 304 of file Abstract.php.
00305 { 00306 foreach (Mage::getSingleton('payment/config')->getCcTypes() as $code => $name) { 00307 $ccTypes[$code] = $name; 00308 } 00309 return $ccTypes; 00310 }
getCompleteType | ( | ) |
Complete type code (Complete, NotComplete)
Definition at line 225 of file Abstract.php.
00226 { 00227 return $this->getSessionData('complete_type'); 00228 }
getConfigData | ( | $ | key, | |
$ | default = false , |
|||
$ | storeId = null | |||
) |
Definition at line 49 of file Abstract.php.
00050 { 00051 if (!$this->hasData($key)) { 00052 if ($storeId === null && $this->getPayment() instanceof Varien_Object) { 00053 $storeId = $this->getPayment()->getOrder()->getStoreId(); 00054 } 00055 $value = Mage::getStoreConfig('paypal/wpuk/'.$key, $storeId); 00056 if (is_null($value) || false===$value) { 00057 $value = $default; 00058 } 00059 $this->setData($key, $value); 00060 } 00061 return $this->getData($key); 00062 }
getCurrencyCode | ( | ) |
Definition at line 268 of file Abstract.php.
00269 { 00270 //return $this->getSessionData('currency_code', 'USD'); 00271 // !!! return $this->getSessionData('currency_code', $this->getPayment()->getOrder()->getStore()->getBaseCurrencyCode()); 00272 return $this->getSessionData('currency_code', Mage::app()->getStore()->getBaseCurrencyCode()); 00273 }
getDebug | ( | ) |
Definition at line 120 of file Abstract.php.
00121 { 00122 return $this->getConfigData('debug_flag', true); 00123 }
getError | ( | ) |
Definition at line 130 of file Abstract.php.
00131 { 00132 return $this->getSessionData('error'); 00133 }
getPartner | ( | ) |
Definition at line 125 of file Abstract.php.
00126 { 00127 return $this->getConfigData('partner', 'PayPalUK'); 00128 }
getPayerId | ( | ) |
Definition at line 210 of file Abstract.php.
00211 { 00212 return $this->getSessionData('payer_id'); 00213 }
getPaymentType | ( | ) |
Has to be one of the following values: Sale or Order or Authorization
Definition at line 240 of file Abstract.php.
00241 { 00242 return $this->getSessionData('payment_type'); 00243 }
getReturnUrl | ( | ) |
the page where buyers return to after they are done with the payment review on PayPal
Definition at line 145 of file Abstract.php.
00146 { 00147 return Mage::getUrl($this->getConfigData('api_return_url', 'paypaluk/express/return')); 00148 }
getSession | ( | ) |
Definition at line 64 of file Abstract.php.
00065 { 00066 return Mage::getSingleton('paypaluk/session'); 00067 }
getSessionData | ( | $ | key, | |
$ | default = false | |||
) |
Definition at line 77 of file Abstract.php.
00078 { 00079 if (!$this->hasData($key)) { 00080 $value = $this->getSession()->getData($key); 00081 if ($this->getSession()->hasData($key)) { 00082 $value = $this->getSession()->getData($key); 00083 } else { 00084 $value = $default; 00085 } 00086 $this->setData($key, $value); 00087 } 00088 return $this->getData($key); 00089 }
getToken | ( | ) |
PayPal API token
Definition at line 180 of file Abstract.php.
00181 { 00182 return $this->getSessionData('token'); 00183 }
getTransactionId | ( | ) |
Definition at line 190 of file Abstract.php.
00191 { 00192 return $this->getSessionData('transaction_id'); 00193 }
getUserAction | ( | ) |
Decide whether to return from Paypal EC before payment was made or after
Definition at line 165 of file Abstract.php.
00166 { 00167 return $this->getSessionData('user_action', self::USER_ACTION_CONTINUE); 00168 }
getUseSession | ( | ) |
Definition at line 69 of file Abstract.php.
00070 { 00071 if (!$this->hasData('use_session')) { 00072 $this->setUseSession(true); 00073 } 00074 return $this->getData('use_session'); 00075 }
setAmount | ( | $ | data | ) |
Definition at line 262 of file Abstract.php.
00263 { 00264 $data = sprintf('%.2f', $data); 00265 return $this->setSessionData('amount', $data); 00266 }
setAuthorizationId | ( | $ | data | ) |
Definition at line 205 of file Abstract.php.
00206 { 00207 return $this->setSessionData('authorization_id', $data); 00208 }
setCompleteType | ( | $ | data | ) |
Definition at line 230 of file Abstract.php.
00231 { 00232 return $this->setSessionData('complete_type', $data); 00233 }
setCurrencyCode | ( | $ | data | ) |
Definition at line 275 of file Abstract.php.
00276 { 00277 return $this->setSessionData('currency_code', $data); 00278 }
setError | ( | $ | data | ) |
Definition at line 135 of file Abstract.php.
00136 { 00137 return $this->setSessionData('error', $data); 00138 }
setPayerId | ( | $ | data | ) |
Definition at line 215 of file Abstract.php.
00216 { 00217 return $this->setSessionData('payer_id', $data); 00218 }
setPaymentType | ( | $ | data | ) |
Definition at line 245 of file Abstract.php.
00246 { 00247 return $this->setSessionData('payment_type', $data); 00248 }
setSessionData | ( | $ | key, | |
$ | value | |||
) |
Definition at line 91 of file Abstract.php.
00092 { 00093 if ($this->getUseSession()) { 00094 $this->getSession()->setData($key, $value); 00095 } 00096 $this->setData($key, $value); 00097 return $this; 00098 }
setToken | ( | $ | data | ) |
Definition at line 185 of file Abstract.php.
00186 { 00187 return $this->setSessionData('token', $data); 00188 }
setTransactionId | ( | $ | data | ) |
Definition at line 195 of file Abstract.php.
00196 { 00197 return $this->setSessionData('transaction_id', $data); 00198 }
setUserAction | ( | $ | data | ) |
Definition at line 170 of file Abstract.php.
00171 { 00172 return $this->setSessionData('user_action', $data); 00173 }
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 = 'authorize' |
Definition at line 35 of file Abstract.php.
const PAYMENT_TYPE_ORDER = 'Order' |
Definition at line 36 of file Abstract.php.
const PAYMENT_TYPE_SALE = 'authorize_capture' |
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.