$payment->setEmail('*****@*****.**');
/* RUN A $0.00 CREDIT CARD AUTH */
$payment->auth('0.00');
$payment->process();
// If transaction was approved..
if ($payment->getStatus() == "APPROVED") {
    $updateRebillPaymentInformation = new BluePayPayment_BP10Emu($accountID, $secretKey, $mode);
    // Creates a new transaction that reflects a customer's updated card expiration date
    // Card Number: 4111111111111111
    // Card Expire: 01/21
    $updateRebillPaymentInformation->setCCInformation('4111111111111111', '0121');
    // Stores new card expiration date
    $updateRebillPaymentInformation->auth("0.00", $payment->getTransID());
    $updateRebillPaymentInformation->process();
    $updateRebill = new BluePayPayment_BP10Emu($accountID, $secretKey, $mode);
    // Updates rebill using Rebill ID token returned
    // Rebill Start Date: March 1, 2015
    // Rebill Frequency: 1 MONTH
    // Rebill # of Cycles: 8
    // Rebill Amount: $5.15
    // Rebill Next Amount: $1.50
    $updateRebill->updateRebillingCycle($payment->getRebillID(), '2015-03-01', '1 MONTH', '8', '5.15', '1.50');
    // Updates the payment information portion of the rebilling cycle to the
    // new card expiration date entered above
    $updateRebill->updateRebillingPaymentInformation($updateRebillPaymentInformation->getTransID());
    $updateRebill->process();
    # Read response from BluePay
    echo 'Rebill ID: ' . $updateRebill->getRebillID() . '<br />' . 'Template ID: ' . $updateRebill->getTemplateID() . '<br />' . 'Rebill Status: ' . $updateRebill->getRebStatus() . '<br />' . 'Rebill Creation Date: ' . $updateRebill->getCreationDate() . '<br />' . 'Rebill Next Date: ' . $updateRebill->getNextDate() . '<br />' . 'Rebill Last Date: ' . $updateRebill->getLastDate() . '<br />' . 'Rebill Expression: ' . $updateRebill->getSchedExpr() . '<br />' . 'Rebill Cycles Remaining: ' . $updateRebill->getCyclesRemaining() . '<br />' . 'Rebill Amount: ' . $updateRebill->getRebAmount() . '<br />' . 'Rebill Next Amount Charged: ' . $updateRebill->getNextAmount();
} else {
    echo $payment->getMessage();
}