Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -122,6 +122,7 @@ class _BillingAgreement extends \IPS\nexus\Customer\BillingAgreement
|
||||
/* PayPal Subscriptions */
|
||||
if ( isset( $data['plan_id'] ) )
|
||||
{
|
||||
$url = '';
|
||||
$transactions = $this->method->api( "billing/subscriptions/{$this->gw_id}/transactions?start_time=" . \IPS\DateTime::create()->sub( new \DateInterval( 'P31D' ) )->rfc3339() . '&end_time=' . \IPS\DateTime::create()->rfc3339(), NULL, 'get' );
|
||||
foreach ( array_reverse( $transactions['transactions'] ?? [] ) as $t )
|
||||
{
|
||||
@@ -129,7 +130,8 @@ class _BillingAgreement extends \IPS\nexus\Customer\BillingAgreement
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\Db::i()->select( 't_id', 'nexus_transactions', array( 't_method=? AND t_gw_id=?', $this->method->id, $t['id'] ) )->first();
|
||||
/* @note SELECT_FROM_WRITE_SERVER transaction race condition */
|
||||
\IPS\Db::i()->select( 't_id', 'nexus_transactions', [ 't_gw_id=? AND t_method=?', $t['id'], $this->method->id ], flags: \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
|
||||
}
|
||||
catch ( \UnderflowException $e )
|
||||
{
|
||||
@@ -157,7 +159,8 @@ class _BillingAgreement extends \IPS\nexus\Customer\BillingAgreement
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\Db::i()->select( 't_id', 'nexus_transactions', array( 't_method=? AND t_gw_id=?', $this->method->id, $t['transaction_id'] ) )->first();
|
||||
/* @note SELECT_FROM_WRITE_SERVER transaction race condition */
|
||||
\IPS\Db::i()->select( 't_id', 'nexus_transactions', [ 't_gw_id=? AND t_method=?', $t['transaction_id'], $this->method->id ], flags: \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
|
||||
}
|
||||
catch ( \UnderflowException $e )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user