#ifndef MERMSEMR_API_H
#define MERMSEMR_API_H

enum {
    DIR_TARGET, DIR_SOURCE};

enum {
    FLAG_INIT, FLAG_START, FLAG_CANCEL, FLAG_FAIL, FLAG_OK
};

enum {
   WHAT_NEW_CARDADD, WHAT_PICKUP_INITIALPAYMENT
};

enum {
    PARTNER_STRIPE
};

#define PHP_API_OK         0
#define PHP_CREATED_OK     10
#define PHP_LOGIN_OK       100
#define PHP_API_BAD_PARAM -1
#define PHP_VALID_SESSION    505
#define PHP_INVALID_SESSION  777

#define MODE_ADD 100
#define MODE_UPDATE 200
#define MODE_DELETE 300
#define MODE_LIST  400

#define NEW_CARD 0
#define EXISTING_CARD  1
#define ACH1 2
#define ACH2 3
#define BALANCE 4
#define INSURANCE 5
#define INVOICED 6

#define INVOICE_PREVIEW  100
#define INVOICE_FINAL    200

#define TRNASPORTER  1
#define TRANSLATOR   2


#define MODE_CONFIRM_ASSIGNMENT  100
#define MODE_REJECT_ASSIGNMENT   200
#define MODE_CANCEL_ASSIGNMENT   210 
#define MODE_ACTIVATE_ASSIGNMENT 300
#define MODE_COMPLETE_ASSIGNMENT 400

#define MODE_RELEASE_DRIVER_ASSIGNMENT  705



#define MEDTRANS_STRIPE_CHARGE_ONE    90004
#define MEDTRANS_STRIPE_CHARGE_NEW    90005
#define MEDTRANS_EMAIL_TEST           90006

#define MEDTRANS_PROCESS_PAYMENT      90011

#define MEDTRANS_UPLOADS           4505
#define MEDTRANS_DOWNLOAD          4506

// MERMS-GENERAL
#define    USER_CREATETASK    2200
#define    USER_LOADTASK      5500
#define    USER_DELETETASK    7700


#define    MODE_SETVALUE    1001
#define    MODE_GETVALUE    2002

#define MERMS_TEST_EMAIL               92015

// USERS
#define    MERMS_USER_START            120000
// //--
#define    MERMS_USER_BEFORESESSION    120010
#define    MERMS_USER_CREATEACCOUNT    120015
#define    MERMS_USER_RESETPASSWORD    120020
#define    MERMS_USER_LOGIN            120025
#define    MERMS_USER_DASHLOAD         120030
#define    MERMS_USER_LOADPROFILE      120035
#define    MERMS_USER_UPDATEPROFILE    120040
#define    MERMS_USER_REMINDERS        120045
#define    MERMS_USER_PRACTICES        120050
// //#define        120001
// //#define        120001
// //--
#define    MERMS_USER_END              129999
//
// // PROVIDERS
#define    MERMS_PROVIDERS_START            150000
// // --
#define    MERMS_PROVIDERS_STARTPRACTICE    150005
#define    MERMS_PROVIDERS_BEFORESESSION    150010
#define    MERMS_PROVIDERS_CREATEACCOUNT    150015
#define    MERMS_PROVIDERS_RESETPASSWORD    150020
#define    MERMS_PROVIDERS_LOGIN            150025
#define    MERMS_PROVIDERS_DASHLOAD         150030
#define    MERMS_PROVIDERS_LOADPROFILE      150035
#define    MERMS_PROVIDERS_UPDATEPROFILE    150040
#define    MERMS_PROVIDERS_REMINDERS        150045
#define    MERMS_PROVIDERS_CREATEMEMBER     150055
#define    MERMS_PROVIDERS_LINKMEMBER       150057

#define	   MERMS_PROVIDERS_CREATECHART	    150060
// //#define        120001
// // -- 
#define    MERMS_PROVIDERS_END              159999
// 

#define MERMSEMR_BKO_START            100000
#define MERMSEMR_BKO_LOGIN            100005
#define MERMSEMR_BKO_CREATEUSER       100010
#define MERMSEMR_BKO_EDITUSER         100011
#define MERMSEMR_BKO_UPDATEMEMBER     100012
#define MERMSEMR_BKO_ADDREASON        100020
#define MERMSEMR_BKO_DELETEALLCARDS   100022
#define MERMSEMR_BKO_ADDCARD          100028
#define MERMSEMR_BKO_LANGUAGE_STATUS  100030
#define MERMSEMR_BKO_END              119999
        
// // MEDTRANS BACK OFFICE FUNCTION*****************
// #define MEDTRANS_BKO_START            100000
// #define MEDTRANS_BKO_LOGIN            100005
// #define MEDTRANS_BKO_CREATEUSER       100010
// #define MEDTRANS_BKO_EDITUSER         100011
// #define MEDTRANS_BKO_UPDATEMEMBER     100012
// #define MEDTRANS_BKO_ADDREASON        100020
// #define MERMSEMR_BKO_DELETEALLCARDS  100022
// #define MERMSEMR_BKO_ADDCARD         100028
// #define MEDTRANS_BKO_LANGUAGE_STATUS  100030





#define MEDTRANS_BKO_CONFIG_USER_TRANSPORT_PRICING 100100
#define MEDTRANS_BKO_CONFIG_USER_TRANSLATOR_PRICING 100101
#define MEDTRANS_BKO_CONFIG_USER_CONCIERGE_PRICING 100102
#define MEDTRANS_BKO_CONFIG_AGENT_TRANSPORT_PRICING 100103
#define MEDTRANS_BKO_CONFIG_AGENT_TRANSLATOR_PRICING 100104
#define MEDTRANS_BKO_CONFIG_AGENT_CONCIERGE_PRICING 100105

#define MEDTRANS_BKO_END              199999
// MEDTRANS USER FUNCTIONS***********************
#define MEDTRANS_USER_START           200000

#define MERMSEMR_USER_DRYCLIST       200002
#define MEDTRANS_USER_LOGIN             200005 // LOGIN  USER
#define MEDTRANS_USER_VERIFYSESSION     200007 // VERIFY SESSION

#define MEDTRANS_USER_CREATE            200010 // CREATE NEW USER
#define MERMSEMR_USER_COMPLETEPROFILE  200013 // Required profile update

#define MEDTRANS_USER_UPDATE            200015 // UPDATING USER PROFILE
#define MEDTRANS_USER_PROFILE           200020 // THIS CREATES THE ADDRESS ENTRY
#define MERMSEMR_USER_SAVECARDPAYMENT  200021
#define MERMSEMR_USER_GETCCLIST        200022

#define MEDTRANS_USER_NEWLUNDRYPICK     200025 // REQUEST TRANSPORT

#define MEDTRANS_USER_GET_TRAN_BYID      200030 // REQUEST TRANSPORT BY ID
#define MERMSEMR_USER_GETSERVICELIST      200035 // REQUEST TRANSPORT LIST
#define MEDTRANS_USER_LUNDRYLOCATION       200040 

#define MEDTRANS_USER_GET_TRANSLLIST     200045 // REQUEST TRANSLATION LIST

#define MEDTRANS_USER_SENDINVOICE        200059
#define MEDTRANS_USER_GET_INVOICE        200060
#define MEDTRANS_USER_GETINVOICE         200063

#define MERMSEMR_USER_CONFIRMPICKUP     200064

#define MERMSEMR_USER_GETSERVICEITEM     200065
#define MEDTRANS_USER_GETCCLIST           200066
//#define MEDTRANS_USER_START_PASSRESET     200067
//#define MEDTRANS_USER_CONFIRM_RESET       200068
//#define MEDTRANS_USER_COMPLETE_PASSRESET  200069

#define MEDTRANS_USER_PASSRESET           200067

#define MERMSEMR_USER_DELETECARD         200075


#define RESET_START     100
#define RESET_CONFIRM   200
#define RESET_COMPLETE  300 



#define MEDTRANS_USER_END             299999
// MEDTRANS INTERPRETERS ***************************
#define MEDTRANS_INTERP_START         300000



#define MEDTRANS_INTERP_END           399999
// MEDTRANS TRANLATORS ***************************
#define MEDTRANS_TRANSP_START         400000

#define MEDTRANS_TRANSP_LOGIN          400005
#define MEDTRANS_LOAD_AGENT            400006

#define MEDTRANS_TRANSP_VERIFYSESSION  400007

#define MEDTRANS_TRANSP_CREATE         400010
#define MEDTRANS_TRANSP_ADDLOCATION    400020
#define MEDTRANS_TRANSP_LISTLOCATION   400021
#define MEDTRANS_TRANSP_EDITLOCATION   400022

#define MEDTRANS_TRANSP_AGENTPROFILE   400024

#define MEDTRANS_TRANSP_ADDDEVICE      400030

#define MEDTRANS_TRANSP_GET_TRANSLIST   400040
#define MEDTRANS_TRANSP_GET_TRANSPORTER 400041
#define MEDTRANS_TRANSP_SET_TRANSSTATUS 400042

#define MEDTRANS_TRANSP_GETREASON       400043

#define MEDTRANS_TRANSP_GET_TRANSLATOR  400044
#define MEDTRANS_TRANSP_ADD_TRANSLATOR  400045
#define MEDTRANS_TRANSP_LIST_TRANSLATOR 400046 
#define MEDTRANS_TRANSP_EDIT_TRANSLATOR 400047
#define MEDTRANS_TRANSP_MANAGELANGUAGE  400049
#define MEDTRANS_TRANSP_LANGUAGELIST    400050



#define MEDTRANS_TRANSP_AGENTLANGUAGE    400051  // LANGUAGE SUPPORTED BY AGENT
#define MEDTRANS_TRANSP_GET_TRANSLATORLIST 400052

#define MEDTRANS_TRANSL_SET_TRANSSTATUS  400055

#define MEDTRANS_TRANSP_DRIVERSCALL      400060
#define MEDTRANS_TRANSP_GETINVOICE       400070


#define MEDTRANS_TRANSP_DEVICELIST      405000

#define TRANSPORT_ASSIGN 100
#define TRANSLATE_ASSIGN 200 


#define PENDING  0 

#define CONFIRMED  2 
#define CANCELLED  3 

#define ASSIGNED   4

#define INPROGRESS  7 // 8,9


#define COMPLETED  5 
#define SETTLED  9 


#define MEDTRANS_TRANSP_ASSIGNTRANSPORT  400080
#define MEDTRANS_TRANSP_ASSIGNTRANSLATOR 400085
    
#define MEDTRANS_TRANSP_CANCELTRANSLATION 470000



#define MEDTRANS_TRANSL_ASSIGNFAIL 490001


#define MEDTRANS_TRANSP_END           499999
//***********************************************
#define MEDTRANS_PROVIDER_START  500000

#define MEDTRANS_PROVIDER_CREATE        500010
#define MEDTRANS_PROVIDER_LOGIN         500020
#define MEDTRANS_PROVIDER_VERIFYSESSION 500021

#define MEDTRANS_PROVIDER_PROVISION     500022
#define MEDTRANS_PROVIDER_SETSTATUS     500023

#define MEDTRANS_PROVIDER_RESETPASS     500025

#define MEDTRANS_PROVIDER_PROFILE       500027
#define MEDTRANS_PROVIDER_UPDATEPROFILE 500028

#define MEDTRANS_PROVIDER_TANSPORTLIST  500060
#define MEDTRANS_PROVIDER_TRANSLATEIST  500065

#define MEDTRANS_PROVIDER_END 599999

//status options
#define PROVIDER_DECLINE    3
#define PROVIDER_CONFIRM    4
#define PROVIDER_COMPLETED  5
#define PROVIDER_STARTED    6

// MEDTRANS CRONS ***************************
#define MEDTRANS_CRON_START               900000

#define CRON_USER_REMINDER                900001
#define CRON_TRANSPORTER_REMINDER         900002
#define CRON_INTERPRETER_REMINDER         900003
#define CRON_PROCESS_DISTANCE             900501

#define CRON_PROCESS_AUTOASSIGN           900510


#define MEDTRANS_CRON_END                999999




#define PAYMENT_MODE   100
#define REFUND_MODE    333

#define OFFER_ACCEPT 100
#define OFFER_REJECT 333
#define OFFER_CANCEL 222

#define CONTRACT_NOTIFY_COMPLETE 4
#define CONTRACT_REQUEST_CANCEL  3
#define CONTRACT_ACCEPT_COMPLETE 5
#define CONTRACT_REJECT_COMPLETE 1

#define SM_PENDING 1
#define SM_CANCEL  3
#define SM_FAILED  4
#define SM_COMPLETED 5


// define email series here
#define ACCOUNT_CREATED_MAIL   100
#define ACCOUNT_CREATED_ALERT  101
#define ACCOUNT_CONTACT_MAIL   102
#define ACCOUNT_CONTACT_ALERT  103
#define ACCOUNT_PASSWORD_RESET  104
#define ACCOUNT_LOGIN_ALERT     105
#define ACCOUNT_RESEND_PENDING  106



#define ACCOUNT_SENDMONEY_ALERT     120
#define ACCOUNT_START_SENDMONEY     121
#define ACCOUNT_COMPLETE_SENDMONEY  122


#define JOBS_CREATED_MAIL     200
#define JOBS_INDIVIDUAL_OFFER_MAIL       201
#define JOBS_GROUP_OFFER_MAIL       202
#define JOBS_MESSAGE_ADDED	     203

#define	JOBS_OFFER_ACCEPT_MAIL 207
#define	JOBS_OFFER_REJECT_MAIL 208
#define JOBS_OFFER_CANCEL_MAIL 209
		

//#define JOBS_CREATED_MAIL     202
//#define JOBS_CREATED_MAIL     203


#define PROJ_CREATED_MAIL      300
//#define PROJ_CREATED_MAIL      301
//#define PROJ_CREATED_MAIL      302
//#define PROJ_CREATED_MAIL      303



//========================


#define MERMSEMR_SESSION_CHECK   299
#define MERMSEMR_USER_LOGIN      300
#define MERMSEMR_USER_LOGOUT     301
#define MERMSEMR_CREATE_ACCOUNT  320

//**************************************************************
// #define MERMSEMR_BKO_START          10000

// #define MERMSEMR_BKO_LOGIN          10010
// #define MERMSEMR_BKO_CREATEUSER     10015
// #define MERMSEMR_BKO_UPDATEUSER     10020


// #define MERMSEMR_BKO_MEMBERADD      100025
// #define MERMSEMR_BKO_MEMBERUPDT     100026

// #define MERMSEMR_BKO_END            10999
//**************************************************************
#define MERMSEMR_ACCOUNT_START          11000

#define MERMSEMR_ACCOUNT_TESTEMAIL      11001
#define MERMSEMR_ACCOUNT_PENDING        11010
#define MERMSEMR_VERIFY_PENDING_LINK    11015
#define MERMSEMR_ACCOUNT_RESETPASS      11016

#define MERMSEMR_DELETE_PENDING_LINK    11018
#define MERMSEMR_RESEND_PENDING_LINK    11019

#define MERMSEMR_ACCOUNT_CREATEACC      11020
#define MERMSEMR_ACCOUNT_LOGIN          11025
#define MERMSEMR_FACEBOOK_LOGIN         11026
#define MERMSEMR_SEND_CONTACTUS         11030
#define MERMSEMR_LOG_MEMBER			   11040


#define MERMSEMR_ACCOUNT_END            11999
//**************************************************************
#define MERMSEMR_GROUP_START          12000

#define MERMSEMR_GROUP_CREATEGROUP    12010
#define MERMSEMR_GROUP_INVITEGROUP    12015
#define MERMSEMR_GROUP_ACCEPTGROUP    12020

#define MERMSEMR_GROUP_END            12999
//**************************************************************
#define MERMSEMR_JOBS_START          13000

#define MERMSEMR_JOB_CREATEJOB        13010

#define MERMSEMR_JOB_GROUP_MEMBER     13015
#define MERMSEMR_JOB_DELETE_GROUPMEMBER 13017

#define MERMSEMR_JOB_CREATE_GROUP     13020
#define MERMSEMR_JOB_DELETE_GROUP     13023


#define MERMSEMR_JOB_OFFER_INDVI     13030
#define MERMSEMR_JOB_OFFER_GROUP     13031

#define MERMSEMR_JOB_OFFER_CONCLUDE  13035


#define MERMSEMR_JOBS_END            13999
//**************************************************************
#define MERMSEMR_CONTRACT_START          14000

#define MERMSEMR_CONTRACT_MESSAGE        14010
#define MERMSEMR_CONTRACT_STATUS         14015
#define MERMSEMR_CONTRACT_END            14999
//**************************************************************

#define  MERMSEMR_SMONEY_START 	    33000

#define  MERMSEMR_SMONEY_ADDRECIPIENT   33010
#define  MERMSEMR_SMONEY_MEMBER         33020
#define  MERMSEMR_SMONEY_PROCFEE        33025

#define  MERMSEMR_SMONEY_END         33999
//**************************************************************



#define MERMSEMR_LOGIN_SHOP               50501
#define MERMSEMR_LOGIN_ADMIN              50502
#define MERMSEMR_LOGIN_MANAGER            50503

#define MERMSEMR_SURVEY_DATA              55000
#define MERMSEMR_ADD_SURVEY	             55050
#define MERMSEMR_LOAD_SURVEY				 55055


#define MERMSEMR_COMPLETE_SENDMONEY_INTERSW     555
#define MERMSEMR_GETBILLER_INTERSW              556
#define MERMSEMR_BILL_PAYMENT_ADVICE_INTERSW    557

#define MERMSEMR_INTERSW_GETBILLER              556
#define MERMSEMR_INTERSW_BILL_PAYMENT_ADVICE    557
#define MERMSEMR_INTERSW_GETBILLERPAYMENTINTEMS 558
#define MERMSEMR_INTERSW_GETBILLERCATEGORIES    559
#define MERMSEMR_INTERSW_DO_TRANSFER            560
#define MERMSEMR_INTERSW_QUERY_TRANSACTION      561

#define MERMSEMR_ADD_MONEYRECIPIENT		600

#define MERMSEMR_CREATE_USER_ACCOUNT  700
#define MERMSEMR_USER_ACCOUNT_LOGIN   710
#define MERMSEMR_START_PASSWORDRESET  720
#define MERMSEMR_COMPLETE_PASSWORDRESET 730 

#define	MERMSEMR_START_ADDMONEY  770 
#define	MERMSEMR_COMPLETE_ADDMONEY	775 

#define MERMSEMR_ADD_MOBILE_TOPUPNUM  900 
#define MERMSEMR_PROMO_CALL 990


#define MERMSEMR_STOREFACE_GET_ACCOUNT_BALANCE 891

#define MERMSEMR_LOG_ENTRY        900000
#define MERMSEMR_CREDIT_TOPUP     900010



#define MERMSEMR_TOPUP_ORDER      900020
#define MERMSEMR_TOPUP_ORDER_PURCHASE	900030
#define MERMSEMR_PAYPAL_IPNMSG    900090



#define MERMSEMR_BULKTOPUP_ORDER		700010
#define MERMSEMR_BULKTOPUP_ITEM			700020
#define MERMSEMR_BULKTOPUP_ITEMUPDATE 	700030
#define MERMSEMR_BULKTOPUP_DELIVER 		700040


#define MERMSEMR_BALANCE_TOPUP_ORDER      800020
#define MERMSEMR_BALANCE_TOPUP_PURCHASE	  800030
#define	MERMSEMR_BALANCE_TOPUP_PAYMENT	  800040

#define	VIRTUAL_AIRTOPUP	   70011

#define PAY_MODE_BALANCE 0
#define PAY_MODE_CCARD   1
#define PAY_MODE_BONUS	 9

#define APPROVED_BALANCE 5
#define DISAPROVE_BALANCE   3
#endif

