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 [2018/07/18 19:28]
michaelheumann [Download]
en:phpsdk:start [2026/07/25 00:09] (current)
michaelheumann [Download]
Line 8: Line 8:
  
 ===== Download ===== ===== Download =====
-{{:phpsdk:girocheckout_sdk_2.1.21.zip|Download GiroCheckout PHP SDK 2.1.21}}+[[https://static.s-publicservices.de/sdks/php/girocheckout_sdk_2.5.13.zip|Download GiroCheckout PHP SDK 2.5.13]]
  
 +==== 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.6.1), the normal version an uneven one (2.5.1). 
 +[[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]].
 ===== Important note regarding notify and redirect ===== ===== Important note regarding notify and redirect =====
 GiroCheckout uses two parallel channels for the communication between the GiroCheckout server and the Shop: The notification (or notify for short) and the redirect.  The notify is a server to server call in the background, whereas the redirect runs over the customer's browser, showing him the transaction result at the end. Both paths must function separately and independently from each other, in case one of them doesn't reach its destination. This way, the transaction is also successful if the notification happens to not arrive at the shop for whatever reason (so only the redirect could be successful) or if the customer interrupts the redirection to the shop site (so only the notify gets through). But of course a check is required on both sides whether the order has already been processed in the shop, in order to avoid a duplicate processing. GiroCheckout uses two parallel channels for the communication between the GiroCheckout server and the Shop: The notification (or notify for short) and the redirect.  The notify is a server to server call in the background, whereas the redirect runs over the customer's browser, showing him the transaction result at the end. Both paths must function separately and independently from each other, in case one of them doesn't reach its destination. This way, the transaction is also successful if the notification happens to not arrive at the shop for whatever reason (so only the redirect could be successful) or if the customer interrupts the redirection to the shop site (so only the notify gets through). But of course a check is required on both sides whether the order has already been processed in the shop, in order to avoid a duplicate processing.
Line 18: 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 165: 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 177: 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 216: 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.1531934914.txt.gz · Last modified: 2021/04/12 14:29