Skip to content

Commit

Permalink
Ticket #3040 - Fix for WebHook processing.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Dec 14, 2020
1 parent 88c621d commit f956c0e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
18 changes: 0 additions & 18 deletions modules/boonex/payment/classes/BxPaymentProviderStripe.php
Expand Up @@ -248,24 +248,6 @@ protected function _createCharge($sToken, $iPendingId, &$aClient, &$aCartInfo)
);
}

protected function _retrieveCharge($sId) {
$oCharge = null;
bx_alert($this->_oModule->_oConfig->getName(), $this->_sName . '_retrieve_charge', 0, false, array(
'charge_id' => &$sId,
'charge_object' => &$oCharge
));

try {
if(empty($oCharge))
$oCharge = \Stripe\Charge::retrieve($sId);
}
catch (Exception $oException) {
return $this->_processException('Retrieve Charge Error: ', $oException);
}

return $oCharge;
}

protected function _createSubscription($sToken, $iPendingId, &$aClient, &$aCartInfo)
{
if(empty($this->_oCustomer))
Expand Down
19 changes: 19 additions & 0 deletions modules/boonex/payment/classes/BxPaymentProviderStripeBasic.php
Expand Up @@ -368,6 +368,25 @@ protected function _retrieveCustomer($sType, $sId)
return $oCustomer;
}

protected function _retrieveCharge($sId)
{
$oCharge = null;
bx_alert($this->_oModule->_oConfig->getName(), $this->_sName . '_retrieve_charge', 0, false, array(
'charge_id' => &$sId,
'charge_object' => &$oCharge
));

try {
if(empty($oCharge))
$oCharge = \Stripe\Charge::retrieve($sId);
}
catch (Exception $oException) {
return $this->_processException('Retrieve Charge Error: ', $oException);
}

return $oCharge;
}

protected function _retrieveSubscription($sCustomerId, $sSubscriptionId)
{
try {
Expand Down

0 comments on commit f956c0e

Please sign in to comment.