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:
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
	}
Thank you.