Skip to content

Pyromn/csob-payment-gateway-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements:

  • installed php 8
  1. download and unzip or clone git repository with java plugin for CSOB payment gateway (https://github.com/csob/paymentgateway)

  2. goto current directory where composer.json is located and run "php .\composer.phar update"

  3. 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'

  4. for others operations use following params ...

    echo via POST method

    php .\src\examples.php -m ECHO_POST
    

    echo via GET method

    php .\src\examples.php -m ECHO_GET    
    

    payment init (standard payment)

    php .\src\examples.php -m PAYMENT_INIT -i config/payment-init-base.json
    

    payment init (oneclick template)

    php .\src\examples.php -m PAYMENT_INIT -i config/payment-init-oneclick-base.json
    

    payment init (custom payment)

    php .\src\examples.php -m PAYMENT_INIT -i config/payment-init-custom-base.json
    

    payment process

    php .\src\examples.php -m PAYMENT_PROCESS -p <pay-id-from-previous-payment-init-call>
    

    payment status

    php .\src\examples.php -m PAYMENT_STATUS -p <pay-id-from-previous-payment-init-call>
    

    payment close

    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 1000
    

    payment reverse

    php .\src\examples.php -m PAYMENT_REVERSE -p <pay-id-from-previous-payment-init-call>
    

    payment refund

    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 1000
    

    oneclick echo

    php .\src\examples.php -m ONECLICK_ECHO -x <orig-pay-id>
    

    oneclick init

    php .\src\examples.php -m ONECLICK_INIT -i config/oneclick-init-base.json
    

    oneclick process

    php .\src\examples.php -m  ONECLICK_PROCESS -p <pay-id-from-previous-oneclick-init-call>
    

    echo customer

    php .\src\examples.php -m ECHO_CUSTOMER -c <customer-id>
    

    applepay echo

    php .\src\examples.php -m APPLEPAY_ECHO
    

    applepay init

    php .\src\examples.php -m APPLEPAY_INIT -i config/applepay-init-base.json -t <base64 encoded payload>
    

    applepay process

    php .\src\examples.php -m  APPLEPAY_PROCESS -p <pay-id-from-previous-applepay-init-call>
    

    googlepay echo

    php .\src\examples.php -m GOOGLEPAY_ECHO  
    

    googlepay init

    php .\src\examples.php -m GOOGLEPAY_INIT -i .\config\googlepay-init-base.json -t  <base64 encoded payload>
    

    googlepay process

    php .\src\examples.php -m GOOGLEPAY_PROCESS -p <pay-id-from-previous-googlepay-init-call>
    

    button init

    php .\src\examples.php -m BUTTON_INIT -i .\config\button-init-base.json
    

    mallpay init

    php .\src\examples.php -m MALLPAY_INIT -i .\config\mallpay-init-base.json
    

    mallpay logistics

    php .\src\examples.php -m MALLPAY_LOGISTICS -i .\config\mallpay-logistics-base.json -p <pay-id-from-previous-mallpay-init-call>
    

    mallpay cancel

    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 | unprocessed
    

    mallpay refund

    php .\src\examples.php -m MALLPAY_REFUND -i .\config\mallpay-refund-base.json -p  <pay-id-from-previous-mallpay-init-call>     
    

    loan init

    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-2
    

    loan logistics

    php .\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_pickup  
    

    loan cancel

    php .\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 | unprocessed   
    

    loan refund

    php .\src\examples.php -m LOAN_REFUND -p <pay-id-from-previous-loan-init-call> -i .\config\loan-refund-base.json   
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages