Skip to content

Commit

Permalink
Add app_id field to FedaPayCheckoutModuleConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
cadlec committed Dec 16, 2019
1 parent 4247079 commit 71876b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export class FedaPayCheckoutDirective implements OnInit {

initFedaPay() {
const FedaPay = window['FedaPay'];

if (this.config.app_id) {
this.options.site_domain = this.config.app_id;
}
const options = Object.assign(this.config, this.options);

if (this.embeded) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface FedaPayCheckoutModuleConfig {
url?: string;
public_key?: string;
locale?: 'en' | 'fr';
app_id?: string;
}

@NgModule({
Expand Down
5 changes: 4 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { FedaPayCheckoutModule } from '../../projects/fedapay-checkout/src/lib/f
],
imports: [
BrowserModule,
FedaPayCheckoutModule.forRoot({ public_key: 'pk_sandbox_XXXXXX' })
FedaPayCheckoutModule.forRoot({
public_key: 'pk_sandbox_XXXXXX',
app_id: 'ionic.app'
})
],
providers: [],
bootstrap: [AppComponent]
Expand Down

0 comments on commit 71876b7

Please sign in to comment.