diff --git a/woocommerce-onpay.php b/woocommerce-onpay.php
index 34e8c0a..48bc834 100644
--- a/woocommerce-onpay.php
+++ b/woocommerce-onpay.php
@@ -429,9 +429,7 @@ public function admin_options() {
echo ent2ncr($html);
return;
} catch (OnPay\API\Exception\TokenException $exception) { // Something's wrong with the token, print link to reauth
- $html .= $this->getOnboardingHtml();
- $html .= '
';
- $html .= '' . __('Log in with OnPay account', 'wc-onpay') . '';
+ $html .= $this->getOnboardingHtml($onpayApi->authorize());
$GLOBALS['hide_save_button'] = true;
$hideForm = true;
}
@@ -1272,15 +1270,19 @@ private function json_response($message, $error = false, $responseCode = 200) {
die(wp_json_encode($response));
}
- private function getOnboardingHtml() {
- $html = '' . __('Don\'t have an OnPay account yet? Order one through DanDomain from DKK 0,- per month.', 'wc-onpay') . '';
- $html .= ' ';
- $html .= '' . __('Get OnPay now', 'wc-onpay') . '';
- $html .= ' ';
- $html .= '' . __('OnPay sellers', 'wc-onpay') . '';
-
- return $html;
- }
+ private function getOnboardingHtml($authUrl) {
+ $html = '';
+ $html .= '
' . __('Log in with OnPay account', 'wc-onpay') . '';
+ $html .= '
';
+ $html .= '
' . __('Don\'t have an OnPay account yet?', 'wc-onpay') . '
';
+ $html .= '
' . __('Order one through DanDomain from DKK 0,- per month.', 'wc-onpay') . '';
+ $html .= '
';
+
+ return $html;
+ }
/**
* Return the name of the option in the WP DB.