PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
**I answer questions in the forum, private messages are not conducive to a helpful community.
Have it working now with webpay
the square would not work for me.
Has anyone here managed to get Apple Pay to work via the Square Web Pay plugin. On Square's developer site it seems to say that as well as verifying the domain we need to add some code to certain pages on our site.
Can anyone help with this as ApplePay seems to be getting quite popular.
Thanks as always
Step 2: Attach Apple Pay to the page
The Apple Pay payment method needs information about the buyer and the payment amount before it can open the Apple Pay sheet. Your application creates a PaymentRequest object to provide that information and then gets a new ApplePay object initialized with it.
The following code creates the payment request and attaches the ApplePay method to the page:
Add an HTML element to the prerequisite walkthrough form with an ID of apple-pay-button. The HTML for the body of index.html should look like the following:
<form id="payment-form">
<!-- Add the below element -->
<div id="apple-pay-button"></div>
<div id="card-container"></div>
<button id="card-button" type="button">Pay $1.00</button>
</form>
<div id="payment-status-container"></div>
Add a style element and button style properties in the <head> tag. For a reference of Apple Pay button styles, see Styling the Apple Pay Button Using CSS.
Add the following functions to the script tag:
function buildPaymentRequest(payments) {
return payments.paymentRequest({
countryCode: 'US',
currencyCode: 'USD',
total: {
amount: '1.00',
label: 'Total',
},
});
}
async function initializeApplePay(payments) {
const paymentRequest = buildPaymentRequest(payments)
const applePay = await payments.applePay(paymentRequest);
// Note: You don't need to `attach` applePay.
return applePay;
}
In the DOMContentLoaded event listener, add the following code after you initialize the ApplePay method:
let applePay;
try {
applePay = await initializeApplePay(payments);
} catch (e) {
console.error('Initializing Apple Pay failed', e);
// There are a number of reason why Apple Pay might not be supported.
// (such as Browser Support, Device Support, Account). Therefore you should
// handle
// initialization failures, while still loading other applicable payment
// methods.
}
I'm encountering a problem since my upgrade to 1.5.8a from 1.5.7
PHP Version: 7.4.33 (host wont upgrade to 8.X, moving hosts next month)
Refreshed token, everything is green on the admin of square webpay module.
When a customer completes and pays for an order, the order in admin says this at the top.
"The configuration of the order's payment module (square_webPay) has changed. No refunds, auths, captures or voids can be done for this order."
Order comes through but payment is basically DOA, module is set for authorization but can't capture,void, or do anything.
What could be causing this error?
you need to look at the code right here:
https://github.com/zencart/zencart/b....php#L517-L520
specifically line 518. one of those 3 conditionals is failing.
it works fine on my test system. not sure what could be causing that.
line 518 from 1.5.8 admin/orders.php is exactly the same as the github code.
Interesting enough, I rolled the 1.5.7d admin/orders.php file back and it works again.
What else should I look for?
This may help. Let us know if it works for you.
https://developer.squareup.com/docs/...ents/apple-pay
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.
Yup, that is what I looked at. Spoke to Square to see where to put that extra code and they said it would need to be sorted in the Zen Cart plugin
"This is Cris from Square Customer Success.
Regarding your query about integrating Apple Pay with Zen Cart. Although Square integrates with Zen Cart to process payments, all API functions are operated and managed by them directly. For help with Zen Cart specific questions, you’ll need to contact their Support Team."
Bookmarks