Version 4.2.0

This commit is contained in:
Neo committed 2025-12-19 05:44:59 -08:00
1 parent 0dc2aee5ed
commit 96997ddd8e
2074 files changed
+125454 -55780

No files matched your search

@@ -1,13 +1,12 @@
<?php
/**
* @brief PayPal Billing Agreement
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 16 Dec 2015
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\Gateway\PayPal;
@@ -1,13 +1,12 @@
<?php
/**
* @brief PayPal Stored Card
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 10 Feb 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\Gateway\PayPal;
@@ -92,7 +91,7 @@ class _CreditCard extends \IPS\nexus\Customer\CreditCard
'type' => $cardType,
'expire_month' => intval( $card->expMonth ),
'expire_year' => intval( $card->expYear ),
'cvv2' => intval( $card->ccv ),
'cvv2' => $card->ccv,
'first_name' => $this->member->cm_first_name,
'last_name' => $this->member->cm_last_name,
) );
@@ -1,13 +1,12 @@
<?php
/**
* @brief PayPal Exception
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 10 Mar 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\Gateway\PayPal;
@@ -34,6 +33,11 @@ class _Exception extends \DomainException
*/
protected $details = array();
/**
* @brief Full Response
*/
protected $fullResponse = '';
/**
* Constructor
*
@@ -43,6 +47,7 @@ class _Exception extends \DomainException
*/
public function __construct( \IPS\Http\Response $response, $refund=FALSE )
{
$this->fullResponse = (string) $response;
\IPS\Log::debug( (string) $response, 'paypal' );
$details = $response->decodeJson();
@@ -112,4 +117,14 @@ class _Exception extends \DomainException
{
return $this->name;
}
/**
* Extra Log Data
*
* @return string
*/
public function extraLogData()
{
return $this->fullResponse;
}
}
@@ -1,13 +1,12 @@
<?php
/**
* @brief PayPal Gateway
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 10 Feb 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\Gateway;
@@ -115,7 +114,7 @@ class _PayPal extends \IPS\nexus\Gateway
}
break;
case 'ILS':
if ( $amount->amount->compare( new \IPS\Math\Number( '40000 ' ) ) !== -1 )
if ( $amount->amount->compare( new \IPS\Math\Number( '40000' ) ) !== -1 )
{
return FALSE;
}
@@ -256,20 +255,20 @@ class _PayPal extends \IPS\nexus\Gateway
/**
* Payment Screen Fields
*
* @param \IPS\nexus\Invoice $invoice Invoice
* @param \IPS\nexus\Money $amount The amount to pay now
* @param \IPS\Member $member The member the payment screen is for (if in the ACP charging to a member's card) or NULL for currently logged in member
* @param array $recurrings Details about recurring costs
* @param \IPS\nexus\Invoice $invoice Invoice
* @param \IPS\nexus\Money $amount The amount to pay now
* @param \IPS\nexus\Customer $member The member the payment screen is for (if in the ACP charging to a member's card) or NULL for currently logged in member
* @param array $recurrings Details about recurring costs
* @return array
*/
public function paymentScreen( \IPS\nexus\Invoice $invoice, \IPS\nexus\Money $amount, \IPS\Member $member = NULL, $recurrings = array() )
public function paymentScreen( \IPS\nexus\Invoice $invoice, \IPS\nexus\Money $amount, \IPS\nexus\Customer $member = NULL, $recurrings = array() )
{
$settings = json_decode( $this->settings, TRUE );
if ( $settings['type'] === 'card' )
{
return array( 'card' => new \IPS\nexus\Form\CreditCard( $this->id . '_card', NULL, FALSE, array(
'types' => array( \IPS\nexus\CreditCard::TYPE_VISA, \IPS\nexus\CreditCard::TYPE_MASTERCARD, \IPS\nexus\CreditCard::TYPE_DISCOVER, \IPS\nexus\CreditCard::TYPE_AMERICAN_EXPRESS ),
'save' => ( $settings['vault'] and \IPS\Member::loggedIn()->member_id ) ? $this : NULL,
'save' => $settings['vault'] ? $this : NULL,
'member' => $member
) ) );
}
@@ -346,6 +345,13 @@ class _PayPal extends \IPS\nexus\Gateway
/* New Card */
else
{
if ( $card->save and !$transaction->member->member_id )
{
$transaction->member = $transaction->invoice->createAccountForGuest();
\IPS\Session::i()->setMember( $transaction->member );
\IPS\Member\Device::loadOrCreate( $transaction->member, FALSE )->updateAfterAuthentication( NULL );
}
if ( $maxMind )
{
$maxMind->setCard( $card );
@@ -376,7 +382,7 @@ class _PayPal extends \IPS\nexus\Gateway
'type' => $cardType,
'expire_month' => intval( $card->expMonth ),
'expire_year' => intval( $card->expYear ),
'cvv2' => intval( $card->ccv ),
'cvv2' => $card->ccv,
'first_name' => $this->_getFirstName( $transaction ),
'last_name' => $this->_getLastName( $transaction ),
'billing_address' => $this->_getAddress( $transaction->invoice->billaddress, $transaction->member )
@@ -402,7 +408,7 @@ class _PayPal extends \IPS\nexus\Gateway
/* Save the card first if the user wants */
if ( $card->save )
{
{
try
{
$storedCard = new \IPS\nexus\Gateway\PayPal\CreditCard;
@@ -1,13 +1,12 @@
<?php
/**
* @brief PayPal Pay Out Gateway
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Community Suite
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage Nexus
* @since 7 Apr 2014
* @version SVN_VERSION_NUMBER
*/
namespace IPS\nexus\Gateway\PayPal;