Jump to content

Generate Subsciption Invoice


Recommended Posts

Hey everyone!


I need to generate an invoice with a subscription product.

This creates everything just fine for any product, but never adds the renewals part. I can see there is a separate $recurrings variable on the checkoutAndPay page. Should I populate that somehow? A bit lost how renewals work.

$invoice_new = new \IPS\nexus\Invoice;
$invoice_new->member = \IPS\nexus\Customer::loggedIn();
$invoice_new->currency = "USD";

$package = \IPS\nexus\Package::load( 1 );      
$item = $package->createItemForCart( $package->price() ); 
$invoice_new->addItem( $item );


I'm using a regular product that renews, not the subscription module because I need to be able to use discount coupons for certain subscriptions, and those don't exist for the subscription module, only regular products.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...