@@ 94-116 (lines=23) @@ | ||
91 | } |
|
92 | ||
93 | function migrate($OSCOM_PayPal) { |
|
94 | if ( defined('MODULE_CONTENT_PAYPAL_LOGIN_SERVER_TYPE') ) { |
|
95 | $server = (MODULE_CONTENT_PAYPAL_LOGIN_SERVER_TYPE == 'Live') ? 'LIVE' : 'SANDBOX'; |
|
96 | ||
97 | if ( defined('MODULE_CONTENT_PAYPAL_LOGIN_CLIENT_ID') ) { |
|
98 | if ( tep_not_null(MODULE_CONTENT_PAYPAL_LOGIN_CLIENT_ID) ) { |
|
99 | if ( !defined('OSCOM_APP_PAYPAL_LOGIN_' . $server . '_CLIENT_ID') || !tep_not_null(constant('OSCOM_APP_PAYPAL_LOGIN_' . $server . '_CLIENT_ID')) ) { |
|
100 | $OSCOM_PayPal->saveParameter('OSCOM_APP_PAYPAL_LOGIN_' . $server . '_CLIENT_ID', MODULE_CONTENT_PAYPAL_LOGIN_CLIENT_ID); |
|
101 | } |
|
102 | } |
|
103 | ||
104 | $OSCOM_PayPal->deleteParameter('MODULE_CONTENT_PAYPAL_LOGIN_CLIENT_ID'); |
|
105 | } |
|
106 | ||
107 | if ( defined('MODULE_CONTENT_PAYPAL_LOGIN_SECRET') ) { |
|
108 | if ( tep_not_null(MODULE_CONTENT_PAYPAL_LOGIN_SECRET) ) { |
|
109 | if ( !defined('OSCOM_APP_PAYPAL_LOGIN_' . $server . '_SECRET') || !tep_not_null(constant('OSCOM_APP_PAYPAL_LOGIN_' . $server . '_SECRET')) ) { |
|
110 | $OSCOM_PayPal->saveParameter('OSCOM_APP_PAYPAL_LOGIN_' . $server . '_SECRET', MODULE_CONTENT_PAYPAL_LOGIN_SECRET); |
|
111 | } |
|
112 | } |
|
113 | ||
114 | $OSCOM_PayPal->deleteParameter('MODULE_CONTENT_PAYPAL_LOGIN_SECRET'); |
|
115 | } |
|
116 | } |
|
117 | ||
118 | if ( defined('MODULE_CONTENT_PAYPAL_LOGIN_THEME') ) { |
|
119 | $OSCOM_PayPal->saveParameter('OSCOM_APP_PAYPAL_LOGIN_THEME', MODULE_CONTENT_PAYPAL_LOGIN_THEME); |
@@ 96-118 (lines=23) @@ | ||
93 | } |
|
94 | ||
95 | function migrate($OSCOM_PayPal) { |
|
96 | if ( defined('MODULE_PAYMENT_PAYPAL_STANDARD_GATEWAY_SERVER') ) { |
|
97 | $server = (MODULE_PAYMENT_PAYPAL_STANDARD_GATEWAY_SERVER == 'Live') ? 'LIVE' : 'SANDBOX'; |
|
98 | ||
99 | if ( defined('MODULE_PAYMENT_PAYPAL_STANDARD_ID') ) { |
|
100 | if ( tep_not_null(MODULE_PAYMENT_PAYPAL_STANDARD_ID) ) { |
|
101 | if ( !defined('OSCOM_APP_PAYPAL_' . $server . '_SELLER_EMAIL') || !tep_not_null(constant('OSCOM_APP_PAYPAL_' . $server . '_SELLER_EMAIL')) ) { |
|
102 | $OSCOM_PayPal->saveParameter('OSCOM_APP_PAYPAL_' . $server . '_SELLER_EMAIL', MODULE_PAYMENT_PAYPAL_STANDARD_ID); |
|
103 | } |
|
104 | } |
|
105 | ||
106 | $OSCOM_PayPal->deleteParameter('MODULE_PAYMENT_PAYPAL_STANDARD_ID'); |
|
107 | } |
|
108 | ||
109 | if ( defined('MODULE_PAYMENT_PAYPAL_STANDARD_PRIMARY_ID') ) { |
|
110 | if ( tep_not_null(MODULE_PAYMENT_PAYPAL_STANDARD_PRIMARY_ID) ) { |
|
111 | if ( !defined('OSCOM_APP_PAYPAL_' . $server . '_SELLER_EMAIL_PRIMARY') || !tep_not_null(constant('OSCOM_APP_PAYPAL_' . $server . '_SELLER_EMAIL_PRIMARY')) ) { |
|
112 | $OSCOM_PayPal->saveParameter('OSCOM_APP_PAYPAL_' . $server . '_SELLER_EMAIL_PRIMARY', MODULE_PAYMENT_PAYPAL_STANDARD_PRIMARY_ID); |
|
113 | } |
|
114 | } |
|
115 | ||
116 | $OSCOM_PayPal->deleteParameter('MODULE_PAYMENT_PAYPAL_STANDARD_PRIMARY_ID'); |
|
117 | } |
|
118 | } |
|
119 | ||
120 | if ( defined('MODULE_PAYMENT_PAYPAL_STANDARD_PAGE_STYLE') ) { |
|
121 | $OSCOM_PayPal->deleteParameter('MODULE_PAYMENT_PAYPAL_STANDARD_PAGE_STYLE'); |