Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\nexus\modules\front\clients;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -63,10 +63,10 @@ class _cards extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$cardData = $card->card;
|
||||
$cards[ $card->id ] = array(
|
||||
'id' => $card->id,
|
||||
'card_type' => $cardData->type,
|
||||
'card_number' => $cardData->lastFour,
|
||||
'card_expire' => ( !is_null( $cardData->expMonth ) AND !is_null( $cardData->expYear ) ) ? str_pad( $cardData->expMonth , 2, '0', STR_PAD_LEFT ). '/' . $cardData->expYear : NULL
|
||||
'id' => $card->id,
|
||||
'card_type' => $cardData->type,
|
||||
'card_number' => $cardData->lastFour ?: $cardData->number,
|
||||
'card_expire' => ( !\is_null( $cardData->expMonth ) AND !\is_null( $cardData->expYear ) ) ? str_pad( $cardData->expMonth , 2, '0', STR_PAD_LEFT ). '/' . $cardData->expYear : NULL
|
||||
);
|
||||
}
|
||||
catch ( \Exception $e ) { }
|
||||
@@ -82,8 +82,9 @@ class _cards extends \IPS\Dispatcher\Controller
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'checkout.css', 'nexus' ) );
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'global_gateways.js', 'nexus', 'global' ) );
|
||||
$form = \IPS\nexus\Customer\CreditCard::create( \IPS\nexus\Customer::loggedIn() );
|
||||
$form = \IPS\nexus\Customer\CreditCard::create( \IPS\nexus\Customer::loggedIn(), FALSE );
|
||||
if ( $form instanceof \IPS\nexus\Customer\CreditCard )
|
||||
{
|
||||
\IPS\nexus\Customer::loggedIn()->log( 'card', array( 'type' => 'add', 'number' => $form->card->lastFour ) );
|
||||
|
||||
Reference in new issue
Block a user