diff --git a/src/Verification/Link.php b/src/Verification/Link.php
index a73a9d8..bc13f43 100644
--- a/src/Verification/Link.php
+++ b/src/Verification/Link.php
@@ -99,7 +99,14 @@ class Link
throw new \InvalidArgumentException('No ID provided.', 1599723825);
}
- $link = $this->settings->getMySkillDisplayUrl() . '/skillup/' . $type . '/' . $id . '/0/';
+ $link = $this->settings->getMySkillDisplayUrl() . '/skillup/' . $type . '/';
+
+ if ($type === self::SKILL_SET) {
+ $link .= '0/' . $id . '/';
+ } else {
+ $link .= $id . '/0/';
+ }
+
switch ($vtype) {
case VERIFICATION_EDUCATIONAL:
$link .= '2';
diff --git a/tests/Unit/Verification/LinkTest.php b/tests/Unit/Verification/LinkTest.php
index 5c582c4..1b3afee 100644
--- a/tests/Unit/Verification/LinkTest.php
+++ b/tests/Unit/Verification/LinkTest.php
@@ -210,7 +210,7 @@ class LinkTest extends TestCase
$subject = new Link($settings->reveal(), 10);
static::assertSame(
- 'https://my.example.com/verify/skillup/skillset/10/0/2',
+ 'https://my.example.com/verify/skillup/skillset/0/10/2',
$subject->getVerificationLink('education', null, Link::SKILL_SET)
);
}
@@ -226,7 +226,7 @@ class LinkTest extends TestCase
$subject = new Link($settings->reveal(), 10);
static::assertSame(
- 'https://my.example.com/verify/skillup/skillset/10/0/4',
+ 'https://my.example.com/verify/skillup/skillset/0/10/4',
$subject->getVerificationLink('business', null, Link::SKILL_SET)
);
}
@@ -242,7 +242,7 @@ class LinkTest extends TestCase
$subject = new Link($settings->reveal(), 10);
static::assertSame(
- 'https://my.example.com/verify/skillup/skillset/10/0/1',
+ 'https://my.example.com/verify/skillup/skillset/0/10/1',
$subject->getVerificationLink('certification', null, Link::SKILL_SET)
);
}
@@ -258,7 +258,7 @@ class LinkTest extends TestCase
$subject = new Link($settings->reveal(), 10);
static::assertSame(
- 'https://my.example.com/verify/skillup/skillset/10/0/3',
+ 'https://my.example.com/verify/skillup/skillset/0/10/3',
$subject->getVerificationLink('self', null, Link::SKILL_SET)
);
}
@@ -275,7 +275,7 @@ class LinkTest extends TestCase
static::assertSame(
implode(PHP_EOL, [
- ' ',
+ ' ',
'