Invision Power Services, Inc. * @copyright (c) Invision Power Services, Inc. * @license https://www.invisioncommunity.com/legal/standards/ * @package Invision Community * @subpackage Nexus * @since 10 Mar 2014 */ namespace IPS\nexus\Form; /* To prevent PHP errors (extending class does not exist) revealing path */ use DomainException; use Exception; use InvalidArgumentException; use IPS\Db; use IPS\Helpers\Form; use IPS\Helpers\Form\FormAbstract; use IPS\Member; use IPS\nexus\CreditCard as CreditCardClass; use IPS\nexus\Customer\CreditCard as CustomerCardClass; use IPS\Theme; use LogicException; use function defined; use function in_array; use function intval; use function is_array; if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) ) { header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' ); exit; } /** * Credit card input class for Form Builder */ class CreditCard extends FormAbstract { /** * @brief Default Options * @code $defaultOptions = array( 'types' => array( \IPS\nexus\CreditCard::TYPE_VISA, ... ), // Accepted card types 'save' => \IPS\nexus\Gateway, // A gateway to handle saving cards (you must save the card manually, but this will allow stored cards to be received) 'member' => \IPS\Member, // The member for saving cards (if NULL, will use currently loggeed in member) 'attr' => array(...), // Will wrap fields in a div with the specified attributes 'jsRequired'=> FALSE, // If true, will add an error in