|
@@ 217-225 (lines=9) @@
|
| 214 |
|
|
| 215 |
|
function getCredentials($module, $type) { |
| 216 |
|
if ( constant('OSCOM_APP_PAYPAL_' . $module . '_STATUS') == '1' ) { |
| 217 |
|
if ( $type == 'email') { |
| 218 |
|
return constant('OSCOM_APP_PAYPAL_LIVE_SELLER_EMAIL'); |
| 219 |
|
} elseif ( $type == 'email_primary') { |
| 220 |
|
return constant('OSCOM_APP_PAYPAL_LIVE_SELLER_EMAIL_PRIMARY'); |
| 221 |
|
} elseif ( substr($type, 0, 7) == 'payflow' ) { |
| 222 |
|
return constant('OSCOM_APP_PAYPAL_PF_LIVE_' . strtoupper(substr($type, 8))); |
| 223 |
|
} else { |
| 224 |
|
return constant('OSCOM_APP_PAYPAL_LIVE_API_' . strtoupper($type)); |
| 225 |
|
} |
| 226 |
|
} |
| 227 |
|
|
| 228 |
|
if ( $type == 'email') { |
|
@@ 228-236 (lines=9) @@
|
| 225 |
|
} |
| 226 |
|
} |
| 227 |
|
|
| 228 |
|
if ( $type == 'email') { |
| 229 |
|
return constant('OSCOM_APP_PAYPAL_SANDBOX_SELLER_EMAIL'); |
| 230 |
|
} elseif ( $type == 'email_primary') { |
| 231 |
|
return constant('OSCOM_APP_PAYPAL_SANDBOX_SELLER_EMAIL_PRIMARY'); |
| 232 |
|
} elseif ( substr($type, 0, 7) == 'payflow' ) { |
| 233 |
|
return constant('OSCOM_APP_PAYPAL_PF_SANDBOX_' . strtoupper(substr($type, 8))); |
| 234 |
|
} else { |
| 235 |
|
return constant('OSCOM_APP_PAYPAL_SANDBOX_API_' . strtoupper($type)); |
| 236 |
|
} |
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
function hasApiCredentials($server, $type = null) { |