id; $productName = $product->name; $productSku = $product->sku; $productAmount = $product->amount; $productQuantity = $product->quantity; $productTotal = $product->total; // amount * quantity $productIsRecurring = $product->is_recurring; // true, false $productRecurringAmount = $product->recurring_amount; // amount charged every rebill period $productRebillPeriod = $product->rebill_period; // integer - complete rebill period is a combination of rebill period // and frequency i.e. 1 months, 30 days, 2 weeks, etc. $productRebillFrequency = $product->rebill_frequency; // days, weeks, months, years } // access coupons associated with the order $coupons = json_decode(stripslashes($_GET["order_coupons"])); foreach($coupons as $coupon) { $couponId = $coupon->id; $couponName = $coupon->name; $couponCode = $coupon->code; } // ---- EVENT TYPES ---- $PAYMENT_RECEIVED = "mm_payment_received"; $PAYMENT_REBILL = "mm_payment_rebill"; $PAYMENT_REBILL_FAILED = "mm_payment_rebill_declined"; $REFUND_ISSUED = "mm_refund_issued"; // ---- PERFORM ACTION BASED ON EVENT TYPE ---- switch($eventType) { case $PAYMENT_RECEIVED: // do something break; case $PAYMENT_REBILL: // do something break; case $PAYMENT_REBILL_FAILED: // do something break; case $REFUND_ISSUED: // do something break; } ?>