Requirements:
- installed php 8
-
download and unzip or clone git repository with java plugin for CSOB payment gateway (https://github.com/csob/paymentgateway)
-
goto current directory where composer.json is located and run "php .\composer.phar update"
-
configure src/examples.php a. setup url of CSOB payment gateway for given environment, i.e. for integration environment set to value API_URL='https://iapi.iplatebnibrana.csob.cz/api/v1.9'
b. setup path to public key of CSOB payment gateway, e.g. MIPS_PUBLIC_KEY_FILENAME='./config/mips_iplatebnibrana.csob.cz.pub'
c. setup merchant ID (assigned by CSOB), e.g. MERCHANT_ID='M1MIPSXXXX'
d. setup path to merchant private key (key generated by https://iplatebnibrana.csob.cz/keygen tool), e.g. PRIVATE_KEY_FILE='./config/M1MIPSXXXX.key'
-
for others operations use following params ...
php .\src\examples.php -m ECHO_POSTphp .\src\examples.php -m ECHO_GETphp .\src\examples.php -m PAYMENT_INIT -i config/payment-init-base.jsonphp .\src\examples.php -m PAYMENT_INIT -i config/payment-init-oneclick-base.jsonphp .\src\examples.php -m PAYMENT_INIT -i config/payment-init-custom-base.jsonphp .\src\examples.php -m PAYMENT_PROCESS -p <pay-id-from-previous-payment-init-call>php .\src\examples.php -m PAYMENT_STATUS -p <pay-id-from-previous-payment-init-call>php .\src\examples.php -m PAYMENT_CLOSE -p <pay-id-from-previous-payment-init-call>or for close to lower amount use -a param to specify totalAmount for payment/close:
php .\src\examples.php -m PAYMENT_CLOSE -p <pay-id-from-previous-payment-init-call> -a 1000php .\src\examples.php -m PAYMENT_REVERSE -p <pay-id-from-previous-payment-init-call>php .\src\examples.php -m PAYMENT_REFUND -p <pay-id-from-previous-payment-init-call>or for partial refund use -a param to specify amount for partial refund:
php .\src\examples.php -m PAYMENT_REFUND -p <pay-id-from-previous-payment-init-call> -a 1000php .\src\examples.php -m ONECLICK_ECHO -x <orig-pay-id>php .\src\examples.php -m ONECLICK_INIT -i config/oneclick-init-base.jsonphp .\src\examples.php -m ONECLICK_PROCESS -p <pay-id-from-previous-oneclick-init-call>php .\src\examples.php -m ECHO_CUSTOMER -c <customer-id>php .\src\examples.php -m APPLEPAY_ECHOphp .\src\examples.php -m APPLEPAY_INIT -i config/applepay-init-base.json -t <base64 encoded payload>php .\src\examples.php -m APPLEPAY_PROCESS -p <pay-id-from-previous-applepay-init-call>php .\src\examples.php -m GOOGLEPAY_ECHOphp .\src\examples.php -m GOOGLEPAY_INIT -i .\config\googlepay-init-base.json -t <base64 encoded payload>php .\src\examples.php -m GOOGLEPAY_PROCESS -p <pay-id-from-previous-googlepay-init-call>php .\src\examples.php -m BUTTON_INIT -i .\config\button-init-base.jsonphp .\src\examples.php -m MALLPAY_INIT -i .\config\mallpay-init-base.jsonphp .\src\examples.php -m MALLPAY_LOGISTICS -i .\config\mallpay-logistics-base.json -p <pay-id-from-previous-mallpay-init-call>php .\src\examples.php -m MALLPAY_CANCEL -p <pay-id-from-previous-mallpay-init-call> -r <reason> avaiable options for a <reason> are: aborted | other_payment | undeliverable | unavailable | abandoned | changed | unprocessedphp .\src\examples.php -m MALLPAY_REFUND -i .\config\mallpay-refund-base.json -p <pay-id-from-previous-mallpay-init-call>php .\src\examples.php -m LOAN_INIT -i .\config\loan-init-base.json with amount override: php .\src\examples.php -m LOAN_INIT -i .\config\loan-init-base.json -a 2000001 with amount and purchaseId override: php .\src\examples.php -m LOAN_INIT -i .\config\loan-init-base.json -a 2000001 -p ZA0019S51966-2php .\src\examples.php -m LOAN_LOGISTICS -p <pay-id-from-previous-loan-init-call> -e <event> avaiable options for event are delivered | picked_up | dispatched | ready_for_pickupphp .\src\examples.php -m LOAN_CANCEL -p <pay-id-from-previous-loan-init-call> -r <reason> avaiable options for reason are: aborted | other_payment | undeliverable | unavailable | abandoned | changed | unprocessedphp .\src\examples.php -m LOAN_REFUND -p <pay-id-from-previous-loan-init-call> -i .\config\loan-refund-base.json