Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Perl) SOAP Request to https://paycenter.piraeusbank.gr/services/tickets/issuer.asmxSends a SOAP Request to https://paycenter.piraeusbank.gr/services/tickets/issuer.asmx
use chilkat(); # This example requires the Chilkat API to have been previously unlocked. # See Global Unlock Sample for sample code. $http = chilkat::CkHttp->new(); $soapXml = chilkat::CkXml->new(); # Set the HTTP request's XML body to the following SOAP XML: # <?xml version='1.0' encoding='UTF-8'?> # <SOAP-ENV:Envelope SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'> # <SOAP-ENV:Body> # <IssueNewTicket xmlns="http://piraeusbank.gr/paycenter/redirection"> # <Request> # <Username xsi:type="xsd:string">TheUserNameOfCustomer</Username> # <Password xsi:type="xsd:string">ThePasswordOfCustomer</Password> # <MerchantId xsi:type="xsd:int">TheMerchantIdOfCustomer</MerchantId> # <PosId xsi:type="xsd:int">ThePosId</PosId> # <AcquirerId xsi:type="xsd:int">TheAcquirerId</AcquirerId> # <MerchantReference xsi:type="xsd:string">str_MerchantReference</MerchantReference> # <RequestType xsi:type="xsd:string">02</RequestType> # <ExpirePreauth xsi:type="xsd:int">0</ExpirePreauth> # <Amount xsi:type="xsd:decimal">strBankAmount</Amount> # <CurrencyCode xsi:type="xsd:int">978</CurrencyCode> # <Installments xsi:type="xsd:unsignedByte">0</Installments> # <Bnpl xsi:type="xsd:unsignedByte">0</Bnpl> # <Parameters xsi:type="xsd:string">SomeValue</Parameters> # <BillAddrCity xsi:type="xsd:string"></BillAddrCity> # <BillAddrCountry xsi:type="xsd:string">300</BillAddrCountry> # <BillAddrLine1 xsi:type="xsd:string"> 7</BillAddrLine1> # <BillAddrPostCode xsi:type="xsd:string"></BillAddrPostCode> # <BillAddrState xsi:type="xsd:string"></BillAddrState> # <ShipAddrCity xsi:type="xsd:string"></ShipAddrCity> # <ShipAddrCountry xsi:type="xsd:string"></ShipAddrCountry> # <ShipAddrLine1 xsi:type="xsd:string"></ShipAddrLine1> # <ShipAddrPostCode xsi:type="xsd:string"></ShipAddrPostCode> # <ShipAddrState xsi:type="xsd:string"></ShipAddrState> # <CardholderName xsi:type="xsd:string"></CardholderName> # <Email xsi:type="xsd:string"></Email> # <HomePhone xsi:type="xsd:string"></HomePhone> # <MobilePhone xsi:type="xsd:string"></MobilePhone> # <WorkPhone xsi:type="xsd:string"></WorkPhone> # </Request> # </IssueNewTicket> # </SOAP-ENV:Body> # </SOAP-ENV:Envelope> $soapXml = "..."; $req = chilkat::CkHttpRequest->new(); $req->put_HttpVerb("POST"); $req->put_SendCharset(0); $req->AddHeader("Content-Type","atext/xml; charset=utf-8"); $req->AddHeader("SOAPAction","???"); $req->put_Path("/services/tickets/issuer.asmx"); $success = $req->LoadBodyFromString($soapXml,"utf-8"); $http->put_FollowRedirects(1); # resp is a HttpResponse $resp = $http->SynchronousRequest("paycenter.piraeusbank.gr",443,1,$req); if ($http->get_LastMethodSuccess() == 0) { print $http->lastErrorText() . "\r\n"; } else { $xmlResponse = chilkat::CkXml->new(); $success = $xmlResponse->LoadXml($resp->bodyStr()); print $xmlResponse->getXml() . "\r\n"; } |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.