Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const js = `onElementsMount: (elements) =>{ // { applePay: true } or null
const js = `onElementsMount: (elements) =>{ // { applePay: true, googlePay: true } or null
if (elements) {
console.log("Successfully mounted elements: ", JSON.stringify(elements));
} else {
Expand Down
11 changes: 10 additions & 1 deletion dist/doc/developer-tools/inlinejs/payment-request.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const js = `const popup = new Paystack()

const onElementsMount = (elements) => {
if (elements && elements.applePay) {
if (elements && (elements.applePay || elements.googlePay)) {
document.querySelector("#pay-button").innerText = "More Payment Options";
}
}
Expand All @@ -16,12 +16,21 @@ try {
loadPaystackCheckoutButton: 'pay-button',
styles: {
theme: 'dark',
orientation: 'horizontal',
applePay: {
width: '100%',
height: '50px',
borderRadius: '3px',
type: 'plain',
locale: 'en'
},
googlePay: {
width: '100%',
height: '50px',
borderRadius: '3px',
buttonType: 'plain',
buttonColor: 'black',
buttonSizeMode: 'fill'
}
},
onElementsMount,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
onElementsMount: (elements) =>{ // { applePay: true } or null
onElementsMount: (elements) =>{ // { applePay: true, googlePay: true } or null
if (elements) {
console.log("Successfully mounted elements: ", JSON.stringify(elements));
} else {
Expand Down
11 changes: 10 additions & 1 deletion src/doc/developer-tools/inlinejs/payment-request/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const popup = new Paystack()

const onElementsMount = (elements) => {
if (elements && elements.applePay) {
if (elements && (elements.applePay || elements.googlePay)) {
document.querySelector("#pay-button").innerText = "More Payment Options";
}
}
Expand All @@ -16,12 +16,21 @@ try {
loadPaystackCheckoutButton: 'pay-button',
styles: {
theme: 'dark',
orientation: 'horizontal',
applePay: {
width: '100%',
height: '50px',
borderRadius: '3px',
type: 'plain',
locale: 'en'
},
googlePay: {
width: '100%',
height: '50px',
borderRadius: '3px',
buttonType: 'plain',
buttonColor: 'black',
buttonSizeMode: 'fill'
}
},
onElementsMount,
Expand Down