Skip to content

Commit 13d972a

Browse files
Jisayjleveugle
authored andcommitted
fix: bad redirect to onboarding for paypal returns
1 parent 5cbb8e1 commit 13d972a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/manager/apps/public-cloud/src/index.controller.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,22 @@ export default class PublicCloudController {
6767
const hashes = this.$window.location.hash.slice(
6868
this.$window.location.hash.indexOf('?') + 1,
6969
).split('&');
70+
// as paypal redirect to search query
71+
// search also in location search
72+
const searchHashes = this.$window.location.search.slice(
73+
this.$window.location.search.indexOf('?') + 1,
74+
).split('&');
7075
const params = {};
7176
hashes.map((hash) => {
7277
const [key, val] = hash.split('=');
7378
params[key] = decodeURIComponent(val);
7479
return true;
7580
});
81+
searchHashes.map((hash) => {
82+
const [key, val] = hash.split('=');
83+
params[key] = decodeURIComponent(val);
84+
return true;
85+
});
7686

7787
if (params.hiPayStatus || params.paypalAgreementStatus) {
7888
return true;

0 commit comments

Comments
 (0)