Skip to content

Commit e191108

Browse files
committed
fix linting errors
1 parent 59d3066 commit e191108

File tree

1 file changed

+4
-5
lines changed
  • advanced-integration/client

1 file changed

+4
-5
lines changed

advanced-integration/client/app.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async function onApproveCallback(data, actions) {
9696
}
9797
}
9898

99-
paypal
99+
window.paypal
100100
.Buttons({
101101
createOrder: createOrderCallback,
102102
onApprove: onApproveCallback,
@@ -110,9 +110,9 @@ function resultMessage(message) {
110110
}
111111

112112
// If this returns false or the card fields aren't visible, see Step #1.
113-
if (paypal.HostedFields.isEligible()) {
113+
if (window.paypal.HostedFields.isEligible()) {
114114
// Renders card fields
115-
paypal.HostedFields.render({
115+
window.paypal.HostedFields.render({
116116
// Call your server to set up the transaction
117117
createOrder: createOrderCallback,
118118
styles: {
@@ -172,10 +172,9 @@ if (paypal.HostedFields.isEligible()) {
172172
return onApproveCallback(data);
173173
})
174174
.catch((orderData) => {
175-
const { links, ...errorMessageData } = orderData;
176175
resultMessage(
177176
`Sorry, your transaction could not be processed...<br><br>${JSON.stringify(
178-
errorMessageData,
177+
orderData,
179178
)}`,
180179
);
181180
});

0 commit comments

Comments
 (0)