$montly_s->monthly_each_days = array(15); $start = new DateTime("2016-1-29"); $start = $start->format('Y-m-d'); $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($scheduleSandE, $montly_s); $schedule->schedule_type = "M"; $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(); $statusInfo = $response->getStatusInformation(); var_dump($statusInfo); echo "Updating..."; $canUpdate = $transaction->updateRecurringBillStatus($transactionId); if ($canUpdate) { $statusUpdated = $transaction->getRecurringBillInformation($transactionId); if ($statusUpdated->getErrors() == null) { var_dump($statusUpdated->getStatusInformation()); } } } else { var_dump($response->getErrors()); }