All pastes #503593 Raw Edit

Stuff

public text v1 · immutable
·published 2007-05-22 22:49 UTC
rendered paste body
select records that could potentially be charged by authenet

repeat with anOrder in resutlset

	if (tManuallyAuthorized = "no") then	
		if (tTimesNotified < 4) then
			// send them an email asking them to approve it
		else
			// they have been bothered enough by the emails, cancel the order
		end if;
	
		continue;
	end if;
	
	status = authorize();
	if (status = "good") then
		// card charged, update the order in some way
	else
		// order failed charging, send them an email or something
	end if;
end repeat;