ich see your checkout demo with the iframe solution and it works well if i start your project. If i adapt this to my own project i get this two values as FALSE so the check can not perform.
This is my Code:
TS FILE:
`
export class HomeComponent implements AfterViewInit {
onSubmit() {
console.log("isCardTypeComplete", this.iframes.isCardTypeComplete());
console.log("isCardpanComplete", this.iframes.isCardpanComplete());
console.log("isCvcComplete", this.iframes.isCvcComplete());
console.log("isExpireMonthComplete", this.iframes.isExpireMonthComplete());
console.log("isExpireYearComplete", this.iframes.isExpireYearComplete());
console.log("check", this.iframes.isComplete());
if (this.iframes.isComplete()) {
// Perform "CreditCardCheck" to create and get a PseudoCardPan; then call your function "payCallback"
this.iframes.creditCardCheck('payCallback');
} else {
alert("Not complete. Nothing done.");
}
}
payCallback(response:any) {
console.debug(response);
}
public generateJsHash(): string
{
// logic to generate hash
}
Hi,
ich see your checkout demo with the iframe solution and it works well if i start your project. If i adapt this to my own project i get this two values as FALSE so the check can not perform.
This is my Code:
TS FILE: `
export class HomeComponent implements AfterViewInit {
iframes: any;
_creditCardCheckResponse: any;
_supportedCardTypes: string[];
constructor() { this._supportedCardTypes = ['V', 'M'] }
ngAfterViewInit() { this.initPayone(); }
initPayone() {
}
onSubmit() { console.log("isCardTypeComplete", this.iframes.isCardTypeComplete()); console.log("isCardpanComplete", this.iframes.isCardpanComplete()); console.log("isCvcComplete", this.iframes.isCvcComplete()); console.log("isExpireMonthComplete", this.iframes.isExpireMonthComplete()); console.log("isExpireYearComplete", this.iframes.isExpireYearComplete()); console.log("check", this.iframes.isComplete()); if (this.iframes.isComplete()) { // Perform "CreditCardCheck" to create and get a PseudoCardPan; then call your function "payCallback" this.iframes.creditCardCheck('payCallback'); } else { alert("Not complete. Nothing done."); }
}
payCallback(response:any) {
}
public generateJsHash(): string { // logic to generate hash }
} `
My Html:
<form (submit)="onSubmit()">
The JSON received from the server
Autodetection callback result
The JSON received from the server
Autodetection callback result