简体   繁体   中英

GPWebpay Webservices in PHP

I am currently making a payment module for my client in PHP and I need to connect to WebServices server.

How do I connect to the following endpoint with php SoapClient in wsdl mode?

https://test.3dsecure.gpwebpay.com/pay-ws/v1/PaymentService  

I am lost in options params.

Thanks a lot.

You have to download the WSDL file from GpWebPay portal (admin).

<?php

$url = 'https://test.3dsecure.gpwebpay.com/pay-ws/v1/PaymentService';


$client = new SoapClient(
    'cws_v1.wsdl',
    array(
        'location' => $url,
        'trace' => 1,
        'cache_wsdl' => WSDL_CACHE_NONE,
        'exceptions' => 0, // Soap vyhodí vlastní chybu s popisem
        'encoding' => 'UTF-8',
        'stream_context'=> stream_context_create(array(
                'http' => array(
                    'user_agent' => 'PHPSoapClient'
                ),
                'ssl'=> array(
                    'verify_peer' => false,
                    'verify_peer_name' => false, 
                    'allow_self_signed' => true
                )
            )
        )
    )
);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM