I have assigned visualforce and apex class on guest user profile.Also i enabled Available for Lightning Experience, Experience Builder sites, and the mobile app. But still in experience its showing an error refused to connect wise-impala-bk33p6-dev-ed.trailblaze.my.site.com refused to connect.
Enabled Vf page for guest user profile
paymentElement.js
if (this.siteclientSecret == undefined){
this.siteclientSecret = '/apex/PaymentElements?clientSecret=' + result.client_secret;
console.log(this.siteclientSecret);
}
//i tried like below as well its showing invalid page
if (this.siteclientSecret == undefined){
this.siteclientSecret = 'myCommunity/apex/PaymentElements?clientSecret=' + result.client_secret;
console.log(this.siteclientSecret);
}
//hardcoded the site page but still getting the same error
if (this.siteclientSecret == undefined){
this.siteclientSecret = 'https://wise-impala-bk33p6-dev-ed.trailblaze.my.site.com/myCommunity/apex/PaymentElements?clientSecret=' + result.client_secret;
console.log(this.siteclientSecret);
}
paymentlement.html
<div class="slds-box slds-theme--default">
<iframe allowpaymentrequest id="add_payment" src={siteclientSecret} height="600px" width="100%"></iframe>
</div>