Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -280,12 +280,18 @@ class _Gateway extends \IPS\Node\Model
|
||||
*/
|
||||
protected static function recountCardStorageGateways()
|
||||
{
|
||||
foreach ( array( 'card_storage_gateways' => count( static::cardStorageGateways() ), 'billing_agreement_gateways' => count( static::billingAgreementGateways() ) ) as $k => $v )
|
||||
$counts = array();
|
||||
foreach ( static::roots() as $gateway )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $v ), array( 'conf_key=?', $k ) );
|
||||
\IPS\Settings::i()->$k = $v;
|
||||
if ( !isset( $counts[ $gateway->gateway ] ) )
|
||||
{
|
||||
$counts[ $gateway->gateway ] = 0;
|
||||
}
|
||||
|
||||
$counts[ $gateway->gateway ]++;
|
||||
}
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
|
||||
\IPS\Settings::i()->changeValues( array( 'card_storage_gateways' => count( static::cardStorageGateways() ), 'billing_agreement_gateways' => count( static::billingAgreementGateways() ), 'gateways_counts' => json_encode( $counts ) ) );
|
||||
}
|
||||
|
||||
/* !Features (Each gateway will override) */
|
||||
@@ -351,6 +357,16 @@ class _Gateway extends \IPS\Node\Model
|
||||
|
||||
/* !Payment Gateway */
|
||||
|
||||
/**
|
||||
* Should the submit button show when this payment method is shown?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function showSubmitButton()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Payment Screen Fields
|
||||
*
|
||||
@@ -364,6 +380,18 @@ class _Gateway extends \IPS\Node\Model
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Manual Payment Instructions
|
||||
*
|
||||
* @param \IPS\nexus\Transaction $transaction Transaction
|
||||
* @param string|NULL $email If this is for the email, will be 'html' or 'plaintext'. If for UI, will be NULL.
|
||||
* @return array
|
||||
*/
|
||||
public function manualPaymentInstructions( \IPS\nexus\Transaction $transaction, $email = NULL )
|
||||
{
|
||||
return $transaction->member->language()->addToStack( "nexus_gateway_{$this->id}_ins" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Authorize
|
||||
@@ -417,6 +445,16 @@ class _Gateway extends \IPS\Node\Model
|
||||
throw new \Exception;
|
||||
}
|
||||
|
||||
/**
|
||||
* Refund Reasons that the gateway understands, if the gateway supports this
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function refundReasons()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Extra data to show on the ACP transaction page
|
||||
*
|
||||
@@ -428,14 +466,50 @@ class _Gateway extends \IPS\Node\Model
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Extra data to show on the ACP transaction page for a dispute
|
||||
*
|
||||
* @param \IPS\nexus\Transaction $transaction Transaction
|
||||
* @param string $ref Dispute reference ID
|
||||
* @return string
|
||||
*/
|
||||
public function disputeData( \IPS\nexus\Transaction $transaction, $ref )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Run any gateway-specific anti-fraud checks and return status for transaction
|
||||
* This is only called if our local anti-fraud rules have not matched
|
||||
*
|
||||
* @param \IPS\nexus\Transaction $transaction Transaction
|
||||
* @return string
|
||||
*/
|
||||
public function fraudCheck( \IPS\nexus\Transaction $transaction )
|
||||
{
|
||||
return $transaction::STATUS_PAID;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL to view transaction in gateway
|
||||
*
|
||||
* @param \IPS\nexus\Transaction $transaction Transaction
|
||||
* @return \IPS\Http\Url|NULL
|
||||
*/
|
||||
public function gatewayUrl( \IPS\nexus\Transaction $transaction )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get output for API
|
||||
*
|
||||
* @param \IPS\Member|NULL $authorizedMember The member making the API request or NULL for API Key / client_credentials
|
||||
* @return array
|
||||
* @apiresponse int id ID number
|
||||
* @apiresponse string name Name
|
||||
*/
|
||||
public function apiOutput()
|
||||
public function apiOutput( \IPS\Member $authorizedMember = NULL )
|
||||
{
|
||||
return array(
|
||||
'id' => $this->id,
|
||||
|
||||
Reference in new issue
Block a user