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!"



[if: $action == 'yes' && $ok == 'no'] [/if]
You forgot to fill in a required field
Purchase a Gift Certificate
 
*'s denote required fields.

[required: -field = 'ammount', -encodenone] Gift Value [endrequired: -field = 'ammount', -encodenone]
Gift From
[required: -field = 'giftto', -encodenone] Gift To [endrequired: -field = 'giftto', -encodenone]
Ship to Buyer Giftee
[required: -field = 'ccname', -encodenone] Name on Card [endrequired: -field = 'ccname', -encodenone]
[if: $ccerror == 'yes' && $action == 'yes'][/if] [required: -field = 'ccnumber', -encodenone] Credit Card Number [endrequired: -field = 'ccnumber', -encodenone] [if: $ccerror == 'yes' && $action == 'yes'][/if]
* Card Type:
* Card Expires Month
* Card Expires Year
[required: -field = 'billingname', -encodenone] Billing Name [endrequired: -field = 'billingname', -encodenone]
[required: -field = 'billingaddress', -encodenone] Billing Address [endrequired: -field = 'billingaddress', -encodenone]
[required: -field = 'billingcity', -encodenone] City [endrequired: -field = 'billingcity', -encodenone]
[required: -field = 'billingstate', -encodenone] State [endrequired: -field = 'billingstate', -encodenone]
[required: -field = 'billingzip', -encodenone] Zip [endrequired: -field = 'billingzip', -encodenone]
[required: -field = 'billingcountry', -encodenone] Country [endrequired: -field = 'billingcountry', -encodenone]
[required: -field = 'billingphone', -encodenone] Phone Number [endrequired: -field = 'billingphone', -encodenone]
Email Address
  Shipping address is only required if sending to giftee
[if: (action_param: 'shipto') == 'shipping'] [required: -field = 'shippingname', encodenone] Ship To [endrequired: -field = 'shippingname', encodenone] [else] Ship To [/if]
[if: (action_param: 'shipto') == 'shipping'] [required: -field = 'shippingaddress', encodenone] Shipping Address [endrequired: -field = 'shippingaddress', encodenone] [else] Shipping Address [/if]
[if: (action_param: 'shipto') == 'shipping'] [required: -field = 'shippingcity', encodenone] City [endrequired: -field = 'shippingcity', encodenone] [else] City [/if]
[if: (action_param: 'shipto') == 'shipping'] [required: -field = 'shippingstate', encodenone] State [endrequired: -field = 'shippingstate', encodenone] [else] State [/if]
[if: (action_param: 'shipto') == 'shipping'] [required: -field = 'shippingzip', encodenone] Zip [endrequired: -field = 'shippingzip', encodenone] [else] Zip [/if]
[if: (action_param: 'shipto') == 'shipping'] [required: -field = 'shippingcountry', encodenone] Country [endrequired: -field = 'shippingcountry', encodenone] [else] Country [/if]
Phone Number
Note to Recipient
Special Instructions
 
[/if]

[include: '/pages/footer-secure.inc']