length == '16';
var: 'ccnumber' = (encrypt_blowfish: -seed = $seed, (action_param: 'ccnumber')); // Card Number
var: 'ccerror' = 'no';
else;
var: 'ccerror' = 'yes';
/if;
var: 'cctype' = (encrypt_blowfish: -seed = $seed, (action_param: 'cctype')); // Card Type
var: 'ccdate' = (encrypt_blowfish: -seed = $seed, (action_param: 'ccmonth') + '/' + (action_param: 'ccyear')); // Experation date
var: 'ccname' = (action_param: 'ccname'); // Name on card
// Billing information
var: 'billingname' = (action_param: 'billingname');
var: 'billingemail' = (action_param: 'billingemail');
var: 'billingaddress' = (action_param: 'billingaddress');
var: 'billingcity' = (action_param: 'billingcity');
var: 'billingstate' = (action_param: 'billingstate');
var: 'billingcountry' = (action_param: 'billingcountry');
var: 'billingzip' = (action_param: 'billingzip');
var: 'billingphone' = (action_param: 'billingphone');
var: 'billingemail' = (action_param: 'billingemail');
// Shipping information
if: (action_param: 'shipto') == 'shipping';
var: 'shippingname' = (action_param: 'shippingname');
var: 'shippingaddress' = (action_param: 'shippingaddress');
var: 'shippingcity' = (action_param: 'shippingcity');
var: 'shippingstate' = (action_param: 'shippingstate');
var: 'shippingcountry' = (action_param: 'shippingcountry');
var: 'shippingzip' = (action_param: 'shippingzip');
var: 'shippingphone' = (action_param: 'shippingphone');
else;
var: 'shippingname' = (action_param: 'billingname');
var: 'shippingaddress' = (action_param: 'billingaddress');
var: 'shippingcity' = (action_param: 'billingcity');
var: 'shippingstate' = (action_param: 'billingstate');
var: 'shippingcountry' = (action_param: 'billingcountry');
var: 'shippingzip' = (action_param: 'billingzip');
var: 'shippingphone' = (action_param: 'billingphone');
/if;
// Other
var: 'id' = (Lasso_UniqueID);
var: 'giftfrom' = (action_param: 'giftfrom');
var: 'giftto' = (action_param: 'giftto');
var: 'shipto' = (action_param: 'shitto');
var: 'giftnote' = (action_param: 'giftnote');
var: 'instructions' = (action_param: 'instructions');
var: 'filename' = $id + '_giftcert.lasso';
var: 'emailbody' = $hostaddress + $viewerfilename + '?id=' + $id;
var: 'ok' = 'yes';
loop: $requiredfields->size;
if: (variable_defined: ($requiredfields->(get: (loop_count)))) == 'False';
$ok = 'no';
output: $requiredfields->get: (loop_count);
loop_abort;
/if;
/loop;
if: (token_value: 'action') == 'send';
var: 'action' = 'yes';
else;
var: 'action' = 'no';
/if;
if: $action == 'yes' && $ccerror == 'no' && $ok == 'yes';
var: 'writeinfo' = (include: $template);
email_send:
-host = $host,
-to = $emailaddress,
-from = $fromaddress,
-bcc = $bccemails,
-subject = $emailsubject,
-body = $emailbody;
email_send:
-host = $host,
-to = $billingemail,
-from = $fromaddress,
-bcc = $bccemails,
-subject = $emailsubject2,
-body = $emailbody2;
inline: -username = 'mendowinetours', -password = 'mendo1234';
file_control;
file_create: $orderfolder + $filename;
file_write: $orderfolder + $filename, $writeinfo, -fileoverwrite;
if: (file_currenterror: -errorcode) != 0;
email_send:
-host = $host,
-to = $bccemails,
-from = 'randalla@mcn.org',
-subject = 'Gift Certificate File Write Error',
-body = 'Error writing file' + $orderfolder + $filename + ' to the drive. Please check the folder permissions and try again.\n\n' + (file_currenterror: -errorcode) + ': ' + file_currenterror + '\n';
/if;
/file_control;
/inline;
var: 'done' = 'yes';
/if;
// Tags to display field text in different color if required field is empty.
// Open tag.
define_tag: 'required';
if: $requiredfields >> (named_param: '-field');
if: ($action == 'yes') && ((string_length: (var: (named_param: '-field'))) == '0');
local: 'print' = '\n* ' + (action_param: (named_param: '-field'));
else;
local: 'print' = '* ';
/if;
else;
local: 'print' = 'error';
/if;
return: #print;
/define_tag;
// Close tag.
define_tag: 'endrequired';
if: $requiredfields >> (named_param: '-field');
if: ($action == 'yes') && ((string_length: (var: (named_param: '-field'))) == '0');
local: 'print' = '\n';
else;
local: 'print' = '';
/if;
else;
local: 'print' = '!';
/if;
return: #print;
/define_tag;
?>
[if: (variable_defined: 'done') == 'True']
[include: '/pages/header.inc']
Thank you for buying a gift certificate.
[else] [include: '/pages/header.inc']|
Gift Certificates
Is there a wine connoisseur in your life? Or perhaps there's a special someone you'd like to surprise with a very wonderful and romantic day. A gift certificate from Mendo Wine Tours is a testament to your discerning taste and abiding affection. For you and yours, for a colleague or client you want to thank, for a relative with a special birthday or anniversary coming up, we make it easy for you to say, À votre sante!" ![]() |
|
|
|
|