Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -150,6 +150,14 @@ class paypalWebhookHandler
|
||||
$invoice->billaddress = $transaction->billing_agreement->member->primaryBillingAddress();
|
||||
foreach ( $purchases as $purchase )
|
||||
{
|
||||
if( !$purchase->renewals )
|
||||
{
|
||||
// Renewals have been cancelled for this purchase since PayPal tried to bill for it.
|
||||
$amount = new \IPS\nexus\Money( $purchase->renewal_price, $transaction->amount->currency );
|
||||
$invoice->addItem( new \IPS\nexus\extensions\nexus\Item\MiscellaneousCharge( sprintf( $purchase->member->language()->get('renew_payment_no_ba'), $purchase->name ), $amount ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
$invoice->addItem( \IPS\nexus\Invoice\Item\Renewal::create( $purchase ) );
|
||||
}
|
||||
$invoice->save();
|
||||
|
||||
Reference in new issue
Block a user