$type = "O"; $endDate = new DateTime("2016-8-29"); $endDate = $endDate->format('Y-m-d'); $scheduleSandE = new ScheduleSartAndEnd(); $scheduleSandE->start_date = $start; $scheduleSandE->end_date_type = $type; $scheduleSandE->end_date = $endDate; $schedule = new Schedule("M"); $schedule->monthly_schedule = $montly_s; $schedule->schedule_start_and_end = $scheduleSandE; $schedule->bill_generation_interval = 1; $recurringBill = new RecurringBill($merchant, $customer, $bill, $card_data, $schedule); $transaction = new TransactionManager($merchant, $WsURL, $oauth_token); $response = $transaction->doRecurringBill($recurringBill); if ($response->getErrors() == null) { $transactionId = $response->getLastRecurringBillResponse()->getRecurringBillId(); $bill->setBaseAmount(2.0); $recurringBill2 = new RecurringBill($merchant, $bill); $canUpdate = $transaction->updateRecurringBill($transactionId, $recurringBill2); if (!is_array($canUpdate)) { $statusUpdated = $transaction->getRecurringBillInformation($transactionId); var_dump($statusUpdated); if ($statusUpdated->getErrors() == null) { var_dump($statusUpdated->getBillInformation()); } } else { var_dump($canUpdate); } } else { var_dump($response->getErrors()); }