Menu

PHP

Updated time: Aug 25, 2020 , 06:38 (UTC+03:00)

PayCEC provides a PHP sample code, includes integration and configuration information.

1. Download and Include

Download link: paycec_php_2.0.zip Checksum SHA1: C3874CD2B9B83964415C49D246CFBCDFE0B83BEB

2. Integrating

You’ll need to have the following before going any further:

  • A PayCEC merchant account.
  • A PHP >= 5.3.3 environment.
  • Enable CURL in Apache
  • Our PHP example code. (download at step 1)

After downloading, you extract file wpc_php_2.0.zip.

extract file wpc_php_2.0.zip

• LIVE MODE IF YOU’RE READY TO GO LIVE

1. Go to PayCEC My account at link https://www.paycec.com/myaccount, select your merchant, click Integration Menu on the left sidebar and disable View test data. We will need to copy Merchant Username and Secret Key.

Go to PayCEC My account at link https://www.paycec.com/myaccount, select your merchant, click Integration Menu on the left sidebar and disable View test data. We will need to copy Merchant Username and Secret Key.

2. Open file customize_initiate.php in extracted folder wpc_php_2.0.
Set $wpcTestMode value to false.
Paste Merchant Username and Secret Key.

Open file customize_initiate.php in extracted folder wpc_php_2.0. Set $wpcTestMode value to false. Paste Merchant Username and Secret Key.

Replace returnUrl and cancelUrl to by your website domain (Ex: wpcphp.test)

Replace returnUrl and cancelUrl to by your website domain (Ex: wpcphp.test)

3. Open file initiate.php in extracted folder wpc_php_2.0.
Set $wpcTestMode value to false.
Paste Merchant Username and Secret Key.

Open file customize_initiate.php in extracted folder wpc_php_2.0. Set $wpcTestMode value to false. Paste Merchant Username and Secret Key.

Replace returnUrl and cancelUrl to by your website domain (Ex: wpcphp.test)

Replace returnUrl and cancelUrl to by your website domain (Ex: wpcphp.test)

4. Open file return.php in extracted folder wpc_php_2.0.
Set $wpcTestMode value to false.
Paste Merchant Username and Secret Key.

Open file customize_initiate.php in extracted folder wpc_php_2.0. Set $wpcTestMode value to false. Paste Merchant Username and Secret Key.

5. Run the demo to understand the payment flow.

• OR TEST MODE

1. Go to PayCEC My account at link https://www.paycec.com/myaccount, select your merchant, click Integration Menu on the left sidebar and enable Viewing test data. We will need to copy Merchant Username and Secret Key.

Go to PayCEC My account at link https://www.paycec.com/myaccount, select your merchant, click Integration Menu on the left sidebar and disable View test data. We will need to copy Merchant Username and Secret Key.

2. Open file customize_initiate.php in extracted folder wpc_php_2.0.
Set $wpcTestMode value to true.
Paste Merchant Username and Secret Key.

Open file customize_initiate.php in extracted folder wpc_php_2.0. Set $wpcTestMode value to true. Paste Merchant Username and Secret Key.

Replace returnUrl and cancelUrl to by your website domain (Ex: wpcphp.test)

Replace returnUrl and cancelUrl to by your website domain (Ex: wpcphp.test)

3. Open file initiate.php in extracted folder wpc_php_2.0.
Set $wpcTestMode value to true.
Paste Merchant Username and Secret Key.

Open file customize_initiate.php in extracted folder wpc_php_2.0. Set $wpcTestMode value to true. Paste Merchant Username and Secret Key.

Replace returnUrl and cancelUrl to by your website domain (Ex: wpcphp.test)

Replace returnUrl and cancelUrl to by your website domain (Ex: wpcphp.test)

4. Open file return.php in extracted folder wpc_php_2.0.
Set $wpcTestMode value to true.
Paste Merchant Username and Secret Key.

Open file customize_initiate.php in extracted folder wpc_php_2.0. Set $wpcTestMode value to true. Paste Merchant Username and Secret Key.

5. Run the demo to understand the payment flow.

Related: Payment Gateway Integration Developer (Detailed version)

How can we help?

How can we help? All information entered on this form will be kept strictly confidential and subject to our privacy policy once received by us. Your transaction will be secured using SSL/TLS encryption.