How to change the card entry form to dark mode? our website is black background and some section of the card input can not display clearly. Square told us that web pay SDK can Customize the Card Entry Form and they have as dark mode.
Thanks.
How to change the card entry form to dark mode? our website is black background and some section of the card input can not display clearly. Square told us that web pay SDK can Customize the Card Entry Form and they have as dark mode.
Thanks.
@swguy, i am finally looking at this error.
i think the way to solve this problem is returning an empty array. corrected code for that 1 method:
thanks for pointing it out.PHP Code:
protected function lookupOrderDetails($order_id)
{
global $db;
$sql = "SELECT * from " . TABLE_SQUARE_PAYMENTS . " WHERE order_id = " . (int)$order_id;
$order = $db->Execute($sql);
if ($order->EOF) {
return [];
}
$ids = [];
// foreach (['tender_id', 'transaction_id', 'payment_id', 'sq_order'] as $key) {
foreach (['tender_id', 'transaction_id', 'sq_order'] as $key) {
if (!empty($order->fields[$key])) {
$ids[] = $order->fields[$key];
}
}
$request = new Models\BatchRetrieveOrdersRequest($ids);
try {
$apiResponse = $this->client->getOrdersApi()->batchRetrieveOrders($request);
$response = $this->processResult($apiResponse, $request);
return $response['results']->getOrders();
} catch (\SquareConnect\ApiException $e) {
return [];
}
}
I have been using square_handler_cron.php from swguy to automatically refresh the Square token. Do I need to make any changes to it to work with Square_webPay? I can't find his code anymore to see if it has been updated. The key statements in his code are:
Thank you.Code:if (IS_CLI == 'VERBOSE') echo 'Starting token refresh... ' . "\n\n"; require DIR_WS_CLASSES . 'payment.php'; $module = new payment('square'); $square = new square; $result = $square->token_refresh_check(); if ($result === 'failure') { if (IS_CLI == 'VERBOSE') echo 'Square Token Refresh Failure. See logs.' . "\n"; if (IS_CLI == 'VERBOSE') echo 'Done.' . "\n\n"; exit(1); } else { if (IS_CLI == 'VERBOSE') echo $result . "\n"; if (IS_CLI == 'VERBOSE') echo 'Done.' . "\n\n"; exit(0); // returns 0 status code, which means successful }
> i think the way to solve this problem is returning an empty array. corrected code for that 1 method ...
Much obliged, sir!
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
dave,
i can not say whether this handler will work. i have a feeling it will not. but i can not say.
the latest version of my handler does verbose logging if you set $verbose to true in the handler. furthermore, i have improved the logging so that in the case of a failed refresh, the error message is much specific. in addition it can be set up as a cron job as well.
i would look at the docs on it.
best.
Should update the version when the version is updated...
public $moduleVersion = '1.0.2';
public $moduleVersion = '1.0.3';
modules/payment/square_webPay.php
Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
Twitch Base8 - Obsidian - This, is what's new.
should?
everybody makes mistakes.
i'm reminded of your comment here:
https://www.zen-cart.com/showthread....99#post1389299
and lack of any real follow up.
so just go bugger off, unless you have anything of any real value to add.
best.
https://docs.zen-cart.com/user/payme..._token_expiry/
Like @carlwhat said - always check the docs!
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Thanks for the updated release... got an issue I can't resolve: I've installed and after I enter the Application Secret(OAuth) and save. When I click edit to go in and set the location. The drop down is blank
Any suggestions on what might be causing this? I do have 2 locations set in square. The one I need to use is the MAIN location set in square.
For domain needtoorder.com
Bookmarks