Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -12,7 +12,7 @@
namespace IPS\nexus\Gateway\PayPal;
/* 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;
@@ -88,12 +88,12 @@ class _CreditCard extends \IPS\nexus\Customer\CreditCard
/* Check it doesn't already exist */
$otherCards = \IPS\Db::i()->select( 'card_data', 'nexus_customer_cards', array( 'card_member=? AND card_method=?', $this->member->member_id, $this->method->id ) );
if ( count( $otherCards ) )
if ( \count( $otherCards ) )
{
foreach ( $otherCards as $otherCardId )
{
$otherCardData = $this->method->api( 'vault/credit-card/' . $otherCardId, NULL, 'get' );
if ( $otherCardData['state'] === 'ok' and mb_substr( $otherCardData['number'], -4 ) === mb_substr( $card->number, -4 ) and intval( $otherCardData['expire_month'] ) === intval( $card->expMonth ) and intval( $otherCardData['expire_year'] ) === intval( $card->expYear ) )
if ( $otherCardData['state'] === 'ok' and mb_substr( $otherCardData['number'], -4 ) === mb_substr( $card->number, -4 ) and \intval( $otherCardData['expire_month'] ) === \intval( $card->expMonth ) and \intval( $otherCardData['expire_year'] ) === \intval( $card->expYear ) )
{
throw new \DomainException( \IPS\Member::loggedIn()->language()->addToStack('card_is_duplicate') );
}
@@ -104,8 +104,8 @@ class _CreditCard extends \IPS\nexus\Customer\CreditCard
$response = $this->method->api( 'vault/credit-card', array(
'number' => $card->number,
'type' => $cardType,
'expire_month' => intval( $card->expMonth ),
'expire_year' => intval( $card->expYear ),
'expire_month' => \intval( $card->expMonth ),
'expire_year' => \intval( $card->expYear ),
'cvv2' => $card->ccv,
'first_name' => $this->member->cm_first_name,
'last_name' => $this->member->cm_last_name,