i4w_list_ccards

Usage:

This shortcode produces a list of credit cards on file belonging to the current, logged in, subscriber to your site.

Through various parameters, listed below, you can specifiy the order of display, filter cards based on known validity, determine the headers for the table listing, whether you want to allow the card to be edited and on which page or URL they should be edited.

Every display aspect is governed by CSS, which you may override as part of the shortcode call.

This shortcode does NOT supports conditional branching with [ELSE_list_ccards].

Shortcode nesting is NOT supported.

Parameters:

status Is used to filter the list based on “valid” status. Can be ‘all, ‘valid’ or ‘invalid’. Please not that only the first character is needed.
Required: No, defaults to ‘all’.
headers Is used to specify column headers for the generated table.
Required: No, defaults to ‘Name on Card,Card,Last 4,Expiration,Status’.
sort Is used to specify the order of display, ‘asc’ for ascending and ‘desc’ for descending, based on the date the card(s) were added to the database.
Required: No, defaults to ‘asc’.
allowedit Is used to specify whether an edit link is added to the table.
Required: No, defaults to ‘true’.
editurl Is used to specify the past/post on which the edit is to take place. When used, this option automatically passes a URL GET parameter of ‘ccid’ with the selected credit card’s ID.
Required: No, defaults to the current page/post.

Example:

[i4w_list_ccards]
Used this way, the shortcode will run with pre-established defaults (see parameters below).

[i4w_list_ccards status='all']
The shortcode will use defaults and will produce a list of all credit cards on file, both valid and not (Note: this is the default behavior and need not be specified).

[i4w_list_ccards status='valid']
The shortcode will use defaults but produce a list of "VALID" creidt cards.

[i4w_list_ccards status='invalid']
The shortcode will use defaults but will only produce a list of "UNPAID" "subscription" invoices.

[i4w_list_ccards sort='asc']
The shortcode will use defaults to produce a list of credit card, sorted by date in ascending order (Note: this is the default behavior and need not be specified).

[i4w_list_ccards sort='desc']
The shortcode will use defaults to produce a list of credit card, sorted by date in descending order.

[i4w_list_ccards headers='Name on Card,Card,Last 4,Expiration,Status']
The shortcode will use all defaults to produce a list and will use these headers for the table columns.

[i4w_list_ccards allowedit='true']
The shortcode will use defaults to produce a list and will add an "edit" link to the row(s) displayed.

[i4w_list_ccards allowedit='true' editurl='http ://myapp.infusionsoft.com/nhywaty']
The shortcode will generate an "edit" link and send the user to the URL specified for editing his/her credit card data.

[i4w_list_ccards allowedit='true' editurl='2345']
The shortcode will generate an "edit" link and, the "URL" being numeric, will send the user to the WordPress page or post with the specified ID URL for editing his/her credit card data.

CSS definition:

Please note that since the shortcode may be used multiple times on a single page/post to represent different views, the CSS elements’ ID’s will be automatically be randomized for each instance.

[i4w_list_cards]

#i4w_cctbl.i4w_table {background-color:#666666;line-height:17px;font-family: Arial;font-size:11px;text-align:left;min-width:600px;width:auto;overflow:hidden;}
#i4w_cctbl.i4w_title {color:darkblue;text-align:center;font-size:15px;}
#i4w_cctbl.i4w_tr_headers {padding:0}
#i4w_cctbl.i4w_td_header {border:0;color:white;font-weight:bold}
#i4w_cctbl.i4w_td_header.right {text-align:right;}
#i4w_cctbl.i4w_tr_data {padding:3px}
#i4w_cctbl.i4w_tr_data.i4w_even {background-color:#F3F3F3;}
#i4w_cctbl.i4w_tr_data.i4w_odd {background-color:#FFFFFF;}
#i4w_cctbl.i4w_td_data {color:black;border:0;}
#i4w_cctbl.i4w_td_data.valid {color:darkgreen;}
#i4w_cctbl.i4w_td_data.invalid {color:darkred;}
#i4w_cctbl.i4w_td_data.right {text-align:right;}

[/i4w_list_cards]

Notes:

In order to fully enable credit card editing, the page upon which the card should be edited must contain the [i4w_ccard_update] shortcode.

In its simplest form, the following shortcode combination will produce a page with a list of editable cards and the the appropriate HTML form to edit each card.

[i4w_ifget get=’ccid’] [i4w_ccard_update] [/i4w_ifget] [i4w_list_ccards]

API:

There is no API function equivalent for this shortcode.