User Tools

Site Tools


en:phpsdk:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:phpsdk:start [2019/08/21 21:38]
michaelheumann
en:phpsdk:start [2026/07/25 00:09] (current)
michaelheumann [Download]
Line 8: Line 8:
  
 ===== Download ===== ===== Download =====
-{{:phpsdk:girocheckout_sdk_2.1.27.zip|Download GiroCheckout PHP SDK 2.1.27}}+[[https://static.s-publicservices.de/sdks/php/girocheckout_sdk_2.5.13.zip|Download GiroCheckout PHP SDK 2.5.13]]
  
 ==== Github ==== ==== Github ====
-GiroCheckout SDK is now also available and installable via composer, packagist and Github.  The version numbers of both releases differ in the second number: The Github version has an even number (such as 2.2.23), the normal version an uneven one (2.1.23). +GiroCheckout SDK is now also available and installable via composer, packagist and Github.  The version numbers of both releases differ in the second number: The Github version has an even number (such as 2.6.1), the normal version an uneven one (2.5.1). 
 [[https://github.com/girosolution/girocheckout_sdk|Find our github repository here]] and  [[https://github.com/girosolution/girocheckout_sdk|Find our github repository here]] and 
 [[https://packagist.org/packages/girosolution/girocheckout-sdk|our package on packagist.org here]]. [[https://packagist.org/packages/girosolution/girocheckout-sdk|our package on packagist.org here]].
Line 22: Line 22:
 The folder "examples" includes any example script. Among them there is an example for every API call as well as a notification and a redirect script. The folder "GiroCheckout_SDK" contains the GiroCheckout_SDK.php, which needs to be included in order to use the SDK functionalities. The folder "examples" includes any example script. Among them there is an example for every API call as well as a notification and a redirect script. The folder "GiroCheckout_SDK" contains the GiroCheckout_SDK.php, which needs to be included in order to use the SDK functionalities.
  
-{{:phpsdk:sdk2.0_folders1.png?nolink&250|}}+{{:phpsdk:ordner.jpg?nolink&250|}}
  
 ===== List of all request types (Request & Notify) ===== ===== List of all request types (Request & Notify) =====
Line 169: Line 169:
 You may do this in one of three ways: You may do this in one of three ways:
  
-1) In your PHP Code:+1) In your PHP code: \\ 
 +Via the environment:
 <code php> <code php>
-apache_setenv( "GIROCHECKOUT_SERVER", "https://other.endpoint.de" );+apache_setenv( "GIROCHECKOUT_SERVER", "https://anderer.endpoint.de" ); 
 +</code> 
 +Or directly through the setServer() method: 
 +<code php> 
 +try { 
 +  $request = new GiroCheckout_SDK_Request( GiroCheckout_SDK_TransactionType_helper::TRANS_TYPE_GIROPAY_TRANSACTION ); 
 +  $request->setSecret($projectPassword); 
 + 
 +  $request->setServer( 2 ); // Set server to 2=dev, 1 is prod 
 + 
 +  $request->addParam('merchantId',$merchantID) 
 +          ->addParam(...) 
 +          ->submit(); 
 +
 +catch(Exception $e) { 
 +  // Handle exception 
 +}
 </code> </code>
 2) On the Linux command line (e.g. for executing the SDK examples without a browser): 2) On the Linux command line (e.g. for executing the SDK examples without a browser):
Line 181: Line 198:
 SetEnv GIROCHECKOUT_SERVER "https://other.endpoint.de" SetEnv GIROCHECKOUT_SERVER "https://other.endpoint.de"
 </code> </code>
 +
 +Version 2.5.12/2.6.12 of the SDK added the ability to select via constan against which host environment the API should send its calls.  This is done by setting one of the following values through above mentioned methods 1-3:
 +
 +^ Value ^ Description ^
 +| gc1-dev | GiroCheckout 1 development environment |
 +| gc1-prod | GiroCheckout 1 production |
 +| gc2-preprod | GiroCheckout 2 pre-production (available soon) |
 +| gc2-prod | GiroCheckout 2 production (available soon) |
 +
 +Note that you need credentials for the environments you are going to use.
 +
 +Please note that in gc1 the URLs containg the string "v2" for historic reasons. Don't confuse with gc2.
  
 ===== Operation via a proxy server ===== ===== Operation via a proxy server =====
Line 220: Line 249:
  
 ==== Set certificate file ==== ==== Set certificate file ====
-Under an Windows server environment it might happen that cURL is not able to check the SSL certrificate. Then it will be necessary to give cURL an specific certificate file. The SDK provides the possibility of setting a local certificate file. Therefor the following code is needed **bevore the $request->submit() method** is called:+Under Windows server environment it might happen that cURL is not able to check the SSL certrificate. Then it will be necessary to give cURL an specific certificate file. The SDK provides the possibility of setting a local certificate file. Therefor the following code is needed **bevore the $request->submit() method** is called:
  
 <code php> <code php>
en/phpsdk/start.1566416328.txt.gz · Last modified: 2021/04/12 14:29