Skip to content

Instantly share code, notes, and snippets.

@steveosoule
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steveosoule/11542679 to your computer and use it in GitHub Desktop.
Save steveosoule/11542679 to your computer and use it in GitHub Desktop.
Miva Merchant: Save Last 4 Digits of Credit Card
<mvt:assign name="g.cc_num_clean" value="trim(glosub( glosub(g.GLOBAL_CC_NUM_VAR,'-',''), ' ', ''))" />
<mvt:assign name="g.cc_last_4" value="substring(g.cc_num_clean,len(g.cc_num_clean) - 3,4)" />
<mvt:item name="customfields" param="Write_Order(l.settings:order:id,'cc_last_4', g.cc_last_4)" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment