----------------------------------------------------------------------------------- Project: PayCertify URL : https://gateway.paycertify.net File : readme.txt ----------------------------------------------------------------------------------- Notes: - First copy the encgateway folder in project directory. - Inlcude the encgateway/init.php file to load the api. - require_once('encgateway/init.php'); ----------------------------------------------------------------------------------- Package: - encgateway - lib - APIB.php - ApiResource.php - ArrayToXml.php - CaptureReceipt.php - Charge.php - GetCardTrx.php - ManageCheckInfo.php - ManageContract.php - ManageContractAddDaysToNextBillDt.php - ManageCreditCardInfo.php - ManageCustomer.php - ProcessStoredCard.php - StoreCard.php - Validation.php - init.php - index.php [Intigration sample file] - readme.txt ----------------------------------------------------------------------------------- Changelog: - 1.0.1 - Improve the readme.txt - Add support for 3DSecure - Add the CaptureReceipt - Add the response parameter [payCertifyTransactionId,ThreeDSecureStatus,kountFraudTran,PolicyID] ----------------------------------------------------------------------------------- SampleCode: - Processcreditcard - O [Optional] - R [Required] - Parameter - TransType | R - Amount | R - Currency | O - CardNum | R - ExpDate | R - NameOnCard | R - CVNum | O - InvNum | R - Street | O - City | O - State | - Zip | R - Country | O - ShippingStreet | O - ShippingCity | O - ShippingState | O - ShippingZip | O - ShippingCountry | O - MobilePhone | O | Required for paycertify service - Email | O | Required for paycertify service - Description | O - TipAmt | O - TaxAmt | O - SureChargeAmt | O - CashBackAmt | O - ServerID | O - PNRef | O | Required for Force,Void,Return - MagData | O - preCertify | O | *Additional Intigration - payCertify | O - GuaranteeService | 0 - 3DSecure | 0 - For user above service just pass the 1 in value of parameter like ['payCertify' => 1] - Additional Intigration -They will need to add a few lines of code into their checkout page for the creation of a Device Session ID - Response - Result - RespMSG - PNRef - PaymentType - TransType - Amount - AuthCode - TransDate - TransTime - payCertifyTransactionId [payCertify] - ThreeDSecureStatus [3DSecure] - kountFraudTran [preCertify] - PolicyID [GuaranteeService] - Additional Intigration - We can provide a snippet of code for them to plug-in to - - Put the above iframe in bottom of page above body - m='fraud_merchant_id here' - s='device_session_id' - Following snippet get the current session_id in php - session_start(); - $device_session_id = session_id(); - Code \Encgateway\Apib::setApiKey("API KEY HERE"); $return = \Encgateway\Charge::create(array('TransType'=>'Sale', 'Amount'=> '1.00', 'Currency'=>'USD', 'CardNum'=>'4111111111111111', 'ExpDate'=>'1233', 'NameOnCard'=>'Robert Cardholder', 'CVNum'=>'123', 'InvNum'=>'1478598057', 'Street'=>'843 Holt Street', 'City'=>'Delray Beach', 'State'=>'FL', 'Zip'=>'33483', 'Country'=>'US', 'ShippingStreet'=>'843 Holt Street', 'ShippingCity'=>'Delray Beach', 'ShippingState'=>'FL', 'ShippingZip'=>'33483', 'ShippingCountry'=>'US', 'MobilePhone'=>'5612765522', 'Email'=>'test@email.com', 'Description'=>'testing details', 'TipAmt'=>'0.00', 'TaxAmt'=>'0.00', 'SureChargeAmt'=>'0.00','CashBackAmt'=>'0.00', 'ServerID'=>'127.0.0.1', 'PNRef'=>'', 'MagData'=>'')); === * ==== - ManageCustomer - O [Optional] - R [Required] - Parameter - TransType | R | ADD UPDATE DELETE - Vendor | R | Merchant id - CustomerID | R | Unique id of customer - CustomerKey | R | For delete or update recored - CustomerName | R | Compnay name - FirstName | O | First name - LastName | O | Title like Business unit - Department | O | Like Sales - Street1 | O | Street address 1 - Street2 | O | Street address 2 - Street3 | O | Street address 3 - City | O | City name - StateID | O | Code of state contain two character - Province | O | Province - CountryID | O | Country code - Zip | O | Zip code - DayPhone | O | Day phone number - NightPhone | O | Night phone number - Mobile | O | Mobile phone number - Fax | O | Fax number - Email | O | Valid email address - Status | O | ACTIVE INACTIVE PENDING CLOSED - Response - CustomerKey - Vendor - code - error - Username - Code - Create Customer $return = \Encgateway\ManageCustomer::crate(array('TransType' => 'ADD','Vendor'=>'107','CustomerID'=>'102','CustomerName' => 'My customer',"FirstName" => ' ','LastName' =>' ','Title'=>' ','Department'=>' ','Street1' => 'Address 1','Street2' => 'Address2','Street3' => 'Address 3','City'=> 'city','StateID' => 'FL','Province' => '','Zip' =>'123456', 'CountryID' => 'US','DayPhone' => '10234','NightPhone' => '1000','Mobile'=> '9898989898','Fax' => '123456','Email'=>'test@gmail.com','Status'=>'ACTIVE')); - Update Customer [CustomerKey] $return = \Encgateway\ManageCustomer::update(array('TransType' => 'UPDATE','Vendor'=>'107',''CustomerKey'=> '58''=>'102','CustomerName' => 'My customer',"FirstName" => ' ','LastName' =>' ','Title'=>' ','Department'=>' ','Street1' => 'Address 1','Street2' => 'Address2','Street3' => 'Address 3','City'=> 'city','StateID' => 'FL','Province' => '','Zip' =>'123456', 'CountryID' => 'US','DayPhone' => '10234','NightPhone' => '1000','Mobile'=> '9898989898','Fax' => '123456','Email'=>'test@gmail.com','Status'=>'ACTIVE')); \ - Delete Customer [CustomerKey] $return = \Encgateway\ManageCustomer::delele(array('TransType' => 'DELETE','Vendor'=>'107',''CustomerKey'=> '58')); === * ==== - ManageContract - O [Optional] - R [Required] - Parameter - TransType | R | Contains value ADD UPDATE DELETE - Vendor | R | Merchant id - CustomerID | R | Unique id of customer - CustomerKey | For delete or update recored - BillAmt | R | Amount billed format | dd.cccc - PaymentInfoKey | R | Id of payment_method | or add and update - PaymentType | R | Contains value CARD CHECK - StartDate | R | MMDDYYYY || The start date must be greater than today's date. - EndDate | R | MMDDYYYY || Date must be greater than the start date. - BillingPeriod | R | Contains value DAY WEEK MONTH YEAR - BillingInterval | R - ContractId | O | Contract id - ContractName | O | Name of contract - TaxAmt | O | Text amount | dd.cccc format - TotalAmt | O | BillAmt + TaxAmt - MaxFailures | O | The number of times the system will try to re-process a failed payment - FailureCount | O | Count failular - Status | O | Contains,ACTIVE INACTIVE PENDING CLOSED - EmailMerchant | O | Send email to merchant 0 = no,1 = true - EmailMerchantFailure | O | Send failular email to merchant 0 = no,1 = true - EmailCustomer | O | Send email to merchant 0 = no,1 = true - EmailCustomerFailure | O | Send failular email to merchant 0 = no,1 = true - Response - ContractKey - Vendor - code - error - Username - Code - Creating Contract $return = \Encgateway\ManageContract::create(array('TransType' => 'ADD','Vendor'=>'107','CustomerKey'=> '45','CustomerID'=>'102','BillAmt' => '12.00','PaymentInfoKey' => '30','PaymentType' => 'CARD','StartDate' => '04302016','EndDate' => '05102016','BillingPeriod' => 'WEEK','BillingInterval' => '2','ContractId' => '0001','ContractName' => 'My contract','TaxAmt' => '0.00','TotalAmt' => '0.00','MaxFailures' => 1,'FailureCount'=>'2','status' => 'ACTIVE','EmailMerchant'=>'1','EmailMerchantFailure'=>'1','EmailCustomer'=>'1','EmailCustomerFailure'=>'1')); - Delete Contract $return = \Encgateway\ManageContract::delete(array('TransType' => 'DELETE','Vendor'=>'107','CustomerKey'=> '45','CustomerID'=>'102','PaymentInfoKey' => '30','ContractKey' => '16','PaymentType' => 'CARD')); - Update Contract $return = \Encgateway\ManageContract::update(array('TransType' => 'UPDATE','Vendor'=>'107','CustomerKey'=> '45','CustomerID'=>'102','BillAmt' => '12.00','PaymentInfoKey' => '30','PaymentType' => 'CARD','StartDate' => '05302016','EndDate' => '05102016','BillingPeriod' => 'WEEK','BillingInterval' => '2','ContractId' => '0001','ContractName' => 'My contract','TaxAmt' => '0.00','TotalAmt' => '0.00','MaxFailures' => 1,'FailureCount'=>'2','status' => 'ACTIVE','EmailMerchant'=>'1','EmailMerchantFailure'=>'1','EmailCustomer'=>'1','EmailCustomerFailure'=>'1')); === * ==== - ManageCreditCardInfo - O [Optional] - R [Required] - Parameter - TransType | R | Contains value ADD UPDATE DELETE - Vendor | R | Merchant id - CustomerKey | R | Customer id - CardInfoKey | R | Unique key for update and delele record - CcAccountNum | O | Valid card number - CcNameOnCard | O | Name on card - CcExpDate | O | Valid expiry date - CcStreet | O | Street address - CCZip | O | zip code - ExtData | O | additional data for future use - Response - CcInfoKey - Vendor - code - error - Username - Code - Creating payment method $return = \Encgateway\ManageCreditCardInfo::create(array('TransType' => 'ADD','Vendor'=>'107','CustomerKey'=>'45','CcAccountNum' => '4111111111111111','CcExpDate' => '0424','CcNameOnCard' => 'testing card','CcStreet' => 'my cc stret','CCZip' => '12032','ExtData' => 'F')); - Delete payment method $return = \Encgateway\ManageCreditCardInfo::delete(array('TransType' => 'DELETE','Vendor'=>'107','CustomerKey'=>'45','CardInfoKey'=> '32')); - Update payment method $return = \Encgateway\ManageCreditCardInfo::update(array('TransType' => 'UPDATE','Vendor'=>'107','CustomerKey'=>'45','CardInfoKey'=> '32','CcAccountNum' => '4111111111111111','CcExpDate' => '0424','CcNameOnCard' => 'update testing card','CcStreet' => 'my cc stret','CCZip' => '12032','ExtData' => 'F')); === * ==== - CaptureReceipt - O [Optional] - R [Required] - Parameter - PNRef | R | Unique id - Amount | R| Amount - AuthCode | R | Authcode - AuthTime | O | Authtime - CardEaseReference | O | Cardeasereference - CardHash | O | Cardhash - CardReference | O | Cardreference - CardType | O | Cardtype - ExpireDate | O | Expiredate - MerchantName | O | Merchantname - PanMasked | O | Panmasked - PanSequence | O | Pansequence - Receipt | O | Receipt - Reference | O | Reference - Result | O | Result - SignatureCaptured | O | Signaturecaptured - SignatureRequired | O | SignatureRequired - TransSource | O | TransSource - TransType | O | TransType - TransVerification | O | Transverification - DeviceModel | O | Devicemodel - DeviceId | O | Deviceid - LinkedTran | O - Response - LogKey - Vendor - code - error - Username - Code - Creating CaptureReceipt $return = \Encgateway\CaptureReceipt::create(array('Amount'=>'23.00','AuthCode' => '2173710','AuthTime' => '20160823090325','CardEaseReference' => '0220e919-4b69-e611-8e66-0050569228c2','CardHash' => 'ExN/uBaDWTa6QkPRlU26rqfKuDU=','CardReference' => '98642dfd-6737-e411-a99d-001422187e37','CardType' => 'VISA DEBIT','ExpireDate' => '1712','MerchantName' => 'Standard Test Merchant', 'PanMasked'=>'476173******0211', 'PanSequence' => '01', 'Receipt' => 'MerchantNameStandard Test MerchantPanMasked************0211Mandatory4TransactionTypeSALEAuthReference96a343ab-cd83-4d9d-868f-2b931c3c6593Mandatory18MerchantIdMasked*****67897Mandatory19TerminalIdMasked****2913Mandatory20AuthDateTime2016/08/23 09:03:25RetentionMessagePlease retain for your recordsTransactionResultAPPROVEDAuthCodeDE758DMandatory17CardholderVerificationPIN VERIFIEDTotalAmountUSD1.00Mandatory11TransactionSourceICCPanSequence01Mandatory5AidA0000000031010Mandatory2CardSchemeVISA DEBITTransactionSeqNumber00000047Optional21', 'Reference' => '96a343ab-cd83-4d9d-868f-2b931c3c6593', 'Result' => 'APPROVED', 'SignatureCaptured' => 'False', 'SignatureRequired' => 'False', 'TransSource' =>'ICC', 'TransType' => 'Sale', 'TransVerification' => 'PIN VERIFIED', 'DeviceModel' => 'Ingenico-iPP350-RBA', 'DeviceId' => '2214324PT012653' )); === * ==== - GetCardTrx - O [Optional] - R [Required] - Parameter - ExcludeVoid | R - BeginDt | R - EndDt | R - User | R - Result | O - TransType | O - PaymentType | O -----------------------------------------------------------------------------------------------------------------