mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Integrate AXO payment process
This commit is contained in:
parent
4e4f00acf5
commit
9391865217
8 changed files with 109 additions and 22 deletions
|
@ -29,8 +29,13 @@ class DomElement {
|
|||
}
|
||||
|
||||
click() {
|
||||
document.querySelector(this.selector).click();
|
||||
this.get().click();
|
||||
}
|
||||
|
||||
get() {
|
||||
return document.querySelector(this.selector);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default DomElement;
|
||||
|
|
|
@ -84,6 +84,11 @@ class DomElementCollection {
|
|||
attributes: 'data-ppcp-axo-show-gateway-selection',
|
||||
});
|
||||
|
||||
this.axoNonceInput = new DomElement({
|
||||
id: 'ppcp-axo-nonce',
|
||||
selector: '#ppcp-axo-nonce',
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
class MockData {
|
||||
class FormFieldGroup {
|
||||
|
||||
constructor(config) {
|
||||
this.data = {};
|
||||
|
@ -97,6 +97,11 @@ class MockData {
|
|||
field.classList.add('ppcp-axo-field-hidden');
|
||||
}
|
||||
}
|
||||
|
||||
inputValue(name) {
|
||||
return document.querySelector(this.fields[name].selector).value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default MockData;
|
||||
export default FormFieldGroup;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue