Skip to content

Commit

Permalink
Merge pull request #10 from angelleye/PFWMA-52
Browse files Browse the repository at this point in the history
Subscription Renewal Fetal Error, PFWMA-52
  • Loading branch information
kcppdevelopers authored Jul 12, 2019
2 parents 340a866 + a978064 commit d63f996
Showing 1 changed file with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,8 @@ public function is_angelleye_multi_account_used($order_id) {
$_multi_account_api_username = get_post_meta($order_id, '_multi_account_api_username', true);
if (!empty($_multi_account_api_username)) {
return true;
} else {
return false;
}
}
if (!class_exists('WooCommerce') || WC()->session == null) {
Expand Down Expand Up @@ -1215,15 +1217,19 @@ public function angelleye_paypal_for_woocommerce_multi_account_api_paypal_expres
$gateway_setting->paypal_password = $microprocessing_value['woocommerce_paypal_pro_payflow_sandbox_api_password'];
$gateway_setting->paypal_vendor = $microprocessing_value['woocommerce_paypal_pro_payflow_sandbox_api_paypal_vendor'];
$gateway_setting->paypal_partner = $microprocessing_value['woocommerce_paypal_pro_payflow_sandbox_api_paypal_partner'];
WC()->session->set('multi_account_api_username', $gateway_setting->paypal_user);
if (class_exists('WooCommerce') && WC()->session ) {
WC()->session->set('multi_account_api_username', $gateway_setting->paypal_user);
}
return;
}
} elseif (!empty($gateway_setting->id) && $gateway_setting->id == 'paypal_express') {
if (!empty($microprocessing_value['woocommerce_paypal_express_sandbox_api_username']) && !empty($microprocessing_value['woocommerce_paypal_express_sandbox_api_password']) && !empty($microprocessing_value['woocommerce_paypal_express_sandbox_api_signature'])) {
$gateway_setting->api_username = $microprocessing_value['woocommerce_paypal_express_sandbox_api_username'];
$gateway_setting->api_password = $microprocessing_value['woocommerce_paypal_express_sandbox_api_password'];
$gateway_setting->api_signature = $microprocessing_value['woocommerce_paypal_express_sandbox_api_signature'];
WC()->session->set('multi_account_api_username', $gateway_setting->api_username);
if (class_exists('WooCommerce') && WC()->session ) {
WC()->session->set('multi_account_api_username', $gateway_setting->api_username);
}
return;
}
}
Expand All @@ -1233,15 +1239,19 @@ public function angelleye_paypal_for_woocommerce_multi_account_api_paypal_expres
$gateway_setting->api_username = $microprocessing_value['woocommerce_paypal_express_api_username'];
$gateway_setting->api_password = $microprocessing_value['woocommerce_paypal_express_api_password'];
$gateway_setting->api_signature = $microprocessing_value['woocommerce_paypal_express_api_signature'];
WC()->session->set('multi_account_api_username', $gateway_setting->api_username);
if (class_exists('WooCommerce') && WC()->session ) {
WC()->session->set('multi_account_api_username', $gateway_setting->api_username);
}
return;
}
} elseif (!empty($gateway_setting->id) && $gateway_setting->id == 'paypal_express') {
if (!empty($microprocessing_value['woocommerce_paypal_express_api_username']) && !empty($microprocessing_value['woocommerce_paypal_express_api_password']) && !empty($microprocessing_value['woocommerce_paypal_express_api_signature'])) {
$gateway_setting->api_username = $microprocessing_value['woocommerce_paypal_express_api_username'];
$gateway_setting->api_password = $microprocessing_value['woocommerce_paypal_express_api_password'];
$gateway_setting->api_signature = $microprocessing_value['woocommerce_paypal_express_api_signature'];
WC()->session->set('multi_account_api_username', $gateway_setting->api_username);
if (class_exists('WooCommerce') && WC()->session ) {
WC()->session->set('multi_account_api_username', $gateway_setting->api_username);
}
return;
}
}
Expand Down Expand Up @@ -1281,7 +1291,9 @@ public function angelleye_paypal_for_woocommerce_multi_account_api_paypal_payflo
$gateway_setting->paypal_password = $microprocessing_value['woocommerce_paypal_pro_payflow_sandbox_api_password'];
$gateway_setting->paypal_vendor = $microprocessing_value['woocommerce_paypal_pro_payflow_sandbox_api_paypal_vendor'];
$gateway_setting->paypal_partner = $microprocessing_value['woocommerce_paypal_pro_payflow_sandbox_api_paypal_partner'];
WC()->session->set('multi_account_api_username', $gateway_setting->paypal_user);
if (class_exists('WooCommerce') && WC()->session ) {
WC()->session->set('multi_account_api_username', $gateway_setting->paypal_user);
}
return;
}
} else {
Expand All @@ -1290,7 +1302,9 @@ public function angelleye_paypal_for_woocommerce_multi_account_api_paypal_payflo
$gateway_setting->paypal_password = $microprocessing_value['woocommerce_paypal_pro_payflow_api_password'];
$gateway_setting->paypal_vendor = $microprocessing_value['woocommerce_paypal_pro_payflow_api_paypal_vendor'];
$gateway_setting->paypal_partner = $microprocessing_value['woocommerce_paypal_pro_payflow_sandbox_api_paypal_partner'];
WC()->session->set('multi_account_api_username', $gateway_setting->paypal_user);
if (class_exists('WooCommerce') && WC()->session ) {
WC()->session->set('multi_account_api_username', $gateway_setting->paypal_user);
}
return;
}
}
Expand Down

0 comments on commit d63f996

Please sign in to comment.