MPA3:Admin area/Settings/Billing Processors/Epoch
Setting up Epoch as billing solution is quite simple and easy.
- Contact Epoch and tell them to set the postback url to: http://YOURMPA3URL/signup/epoch.php
- Set the EPOCH company code, EPOCH master code, EPOCH password, EPOCH username for Cancel API, EPOCH password for Cancel API, EPOCH database host, EPOCH database, EPOCH database username, EPOCH database password. Epoch database is the Epoch's DataPlus database that you have to create in order Epoch to be able to provide you with the transaction data ( containing sales, cancellations, credits, chargebacks, recurrings, conversions ) on 15 minute delayed basis. If you do that for the first time please read the last section of this article before you proceed.
- Set the product codes for the site you are about to sell via Epoch. This you can do under sites management -> products for each of the sites.
- Make sure the file mpa3root/backend/epoch_transactions.php is in the crontab and is set to run on every 15 minutes. (contact support for assistance)
- Make sure the epoch_transactions.php file is fetching the transactions from the Epoch server (database). (contact support for assistance)
Epoch cancelation process: According to the new Epoch API for cancelling members, you need to do the following steps:
- You will need to create a specific login for mpa3 which is granted Customer Search privileges at the following location: https://www.epoch.com/tools/users
- Once login has been created, you would need to email firstname.lastname@example.org, requesting that the specific IP of your mpa3 server be allowed to contact to our Search Form API for your Master Account, M-XXXXXX
- Epoch should email you back advising that IP's have been granted. After this confirmation, please inform us so we would be able to proceed with tests.
Epoch upsales (selling someone else's sites on your epoch join pages)
When you sell someone else's sites on your join pages, you need to enter their product code in the po_code field. This code will be passed to Epoch when redirecting the member, and epoch will show the appropriate cross sale product on your join pages.
When a member buy's the product of your partner (that you are selling on your join page), he will receive a standard transaction on his account. In order to recognize that the sale is made on your site, you can set the additional po_rf_code1 parameter, that will be passed along with the product on your join page and will be added as referrer to the transaction of your partner. This way, he can keep track of how many sales were done via your join page, and eventually credit you for the sales. If your partner was using mpa3 as well, you need to register in his mpa3 as a webmaster, and the po_rf_code1 code you will use will be formed as xsellXXXXXX, where XXXXXX is your webmater id in your partner's mpa3. In case you are selling two products on your join page, by different partners, you need to request from epoch a po_code that is combined and will show the products of both of your partners. In this case you need to use po_rf_code2 to enter your affiliate id with your second partner's affiliate program.
Epoch xsells (someone else is selling your sites on their epoch join pages)
Your partner must register as a webmaster to your mpa3. Request po_code and pi_code from Epoch for the products that your webmaster is about to sell on his epoch join pages. You must set the pi_code under mpa3admin>sites>cross sell sites.
Give the po_code to your webmaster and set thepi_code in mpa3. Get the webmaster epoch company code and enter it in co_code. Your partner will have to perform what is described in Epoch upsales (above).
To provide you with the transaction data ( containing sales, cancellations, credits, chargebacks, recurrings, conversions) on 15 minute delayed basis. This data will be populated in a MYSQL database sitting on your server. In order for us to provide you with the data, we will need you to create a table in accordance with the table schema below.
Create a username epoch_stats; grant select; insert privileges on the table to epoch_stats from %paycom.net (anywhere from paycom.net ) server.
Provide us with the IP of the database server and the database name and the password for the username epoch_stats.
Also you will need to open your firewall to allow our class C (208.236.105.XXX, 63.81.1.XXX, 63.84.23.XXX) to contact the IP/port of your database server that we will be writing to.
Note from the mpa3 team- please allow access to the EpochTransStatsfrom the mpa3 server as well, as mpa3 will need to access it in order to get transaction information.
This should get us rolling, to pull up the stats you will just need to look into your database on a periodic basis and grab the data from there instead of pulling from our system on a periodic basis. This has been implemented with some of our clients and has been working well to their and our satisfaction.
Once you have your database, table and firewall configured, please contact email@example.com to manually test and verify your setup. Once this is verified manually, your information can be setup to automatically transfer data.
Here is that table schema:
CREATE TABLE `EpochTransStats` ( `ets_transaction_id` int(11) NOT NULL default '0', `ets_member_idx` int(11) NOT NULL default '0', `ets_transaction_date` datetime default NULL, `ets_transaction_type` char(1) default '', `ets_co_code` varchar(6) default '', `ets_pi_code` varchar(32) default '', `ets_reseller_code` varchar(64) default 'a', `ets_transaction_amount` decimal(10,2) NOT NULL default '0.00', `ets_payment_type` char(1) default 'A', `ets_pst_type` char(3) default '', `ets_username` varchar(32) default '', `ets_password` varchar(32) default '', `ets_email` varchar(32) default '', `ets_ref_trans_ids` int(11) NOT NULL default '0', `ets_password_expire` varchar(20) default '', `ets_country` char(2) default '', `ets_state` char(2) default '', `ets_postalcode` varchar(32) default '', `ets_city` varchar(64) default '', `ets_street` varchar(80) default '', `ets_ipaddr` varchar(16) default '', `ets_firstname` varchar(32) default '', `ets_lastname` varchar(32) default '', `ets_user1` varchar(32) default '', PRIMARY KEY (`ets_transaction_id`), KEY `idx_reseller` (`ets_reseller_code`), KEY `idx_product` (`ets_pi_code`), KEY `idx_transdate` (`ets_transaction_date`), KEY `idx_type` (`ets_transaction_type`) ) ; Transaction Type Codes C = Credit to Customers Account D = Chargeback Transaction F = Initial Free Trial Transaction I = Standard Initial Recurring Transaction J = Denied Trial Conversion K = Cancelled Trial N = Non-Initial Recurring Transaction O = Non-Recurring Transaction T = Initial Paid Trial Order Transaction U = Initial Trial Conversion X = Returned Check Transaction Payment Method Codes V = Visa M = MasterCard O = Other B = ACH
Here is the schema of the table that you need to create in order to receive the cancellation data.
Please let me know as soon as it is set up, so that I can start sending cancellation stats to your database.
CREATE TABLE MemberCancelStats ( mcs_or_idx int(11) NOT NULL default '0', mcs_canceldate datetime default NULL, mcs_signupdate datetime default NULL, mcs_cocode varchar(16) NOT NULL default '', mcs_picode varchar(32) NOT NULL default '', mcs_reseller varchar(32) default NULL, mcs_reason varchar(64) default NULL, mcs_memberstype char(1) default NULL, mcs_username varchar(32) default NULL, mcs_email varchar(64) default NULL, mcs_passwordremovaldate datetime default NULL, PRIMARY KEY (mcs_or_idx), KEY ix_initdate (mcs_canceldate), KEY ix_signupdate (mcs_signupdate), KEY ix_pwdremdate (mcs_passwordremovaldate) ) TYPE=MyISAM;