forked from brendo/eway
-
Notifications
You must be signed in to change notification settings - Fork 1
Recurring
abocati edited this page Oct 11, 2012
·
4 revisions
<?
Array to create a new rebill Event.
$create = array( 'RebillCustomerID' => '30373', 'RebillInvRef' => '', 'RebillInvDes' => '', 'RebillCCName' => 'Credit Card', 'RebillCCNumber' => '4444333322221111', 'RebillCCExpMonth' => '09', 'RebillCCExpYear' => '2015', 'RebillInitAmt' => '2000', // in cents 'RebillInitDate' => '12/10/2012', 'RebillRecurAmt' => '2000', // in cents 'RebillStartDate' => '12/10/2012', 'RebillEndDate' => '12/10/2013', 'frequency' => 1, // 1 => Weekly, 2 => Fortnightly, 3 => Monthly, 4 => Yearly );
Updating a Rebill Event.
$update = array( 'RebillCustomerID' => '55447', 'RebillID' => '69875', 'RebillInvRef' => '', 'RebillInvDes' => '', 'RebillCCName' => 'Credit Card', 'RebillCCNumber' => '4444333322221111', 'RebillCCExpMonth' => '09', 'RebillCCExpYear' => '2015', 'RebillInitAmt' => '2000', // in cents 'RebillInitDate' => '12/10/2012', 'RebillRecurAmt' => '2000', // in cents 'RebillStartDate' => '12/10/2012', 'RebillEndDate' => '12/10/2013', 'frequency' => 3, // 1 => Weekly, 2 => Fortnightly, 3 => Monthly, 4 => Yearly );
Creating a new reBill Customer.
$reBillCustomer = array( 'customerTitle' => 'Mr', 'customerFirstName' => 'Andre', 'customerLastName' => 'B', 'customerAddress' => '', 'customerSuburb' => '', 'customerState' => '', 'customerCompany' => '', 'customerPostCode' => '', 'customerCountry' => '', 'customerEmail' => '[email protected]', 'customerFax' => '', 'customerPhone1' => '', 'customerPhone2' => '', 'customerRef' => '', 'customerJobDesc' => '', 'customerComments' => '', 'customerURL' => 'http://www.xyz.com.au', );
Create a new reBill Customer ID.
$customerId = eWayAPI::createRebillCustomerID($reBillCustomer);
Create a new reBill Event
$rebillID = eWayAPI::createRebillEvent($create);
Query ALL reBill Events
$history = eWayAPI::queryTransactions($customerId, $rebillID);
Query the next reBill Event
$nextEvent = eWayAPI::queryNextTransaction($customerId, $rebillID);
Update a reBill Event
$update = eWayAPI::updateRebillEvent($update);
Delete a reBill Event
$deleteRebill = eWayAPI::deleteRebillEvent($customerId, $rebillID);