Fix for AXO sdk changes

This commit is contained in:
Pedro Silva 2024-04-16 16:37:12 +01:00
parent 11b87155f3
commit 86be3055c5
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
2 changed files with 6 additions and 4 deletions

View file

@ -70,8 +70,10 @@ class SdkClientToken {
*/ */
public function sdk_client_token( string $target_customer_id = '' ): string { public function sdk_client_token( string $target_customer_id = '' ): string {
$bearer = $this->bearer->bearer(); $bearer = $this->bearer->bearer();
$domain = $_SERVER['HTTP_HOST'];
$url = trailingslashit( $this->host ) . 'v1/oauth2/token?grant_type=client_credentials&response_type=client_token&intent=sdk_init&domains[]=*.' . $domain;
$url = trailingslashit( $this->host ) . 'v1/oauth2/token?grant_type=client_credentials&response_type=client_token&intent=sdk_init';
if ( $target_customer_id ) { if ( $target_customer_id ) {
$url = add_query_arg( $url = add_query_arg(
array( array(

View file

@ -451,10 +451,10 @@ class AxoManager {
this.el.gatewayRadioButton.trigger('change'); this.el.gatewayRadioButton.trigger('change');
} }
renderWatermark() { async renderWatermark() {
this.fastlane.FastlaneWatermarkComponent({ (await this.fastlane.FastlaneWatermarkComponent({
includeAdditionalInfo: true includeAdditionalInfo: true
}).render(this.el.watermarkContainer.selector); })).render(this.el.watermarkContainer.selector);
} }
watchEmail() { watchEmail() {