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
Last revision Both sides next revision
en:phpsdk:start [2018/12/13 15:11]
michaelheumann [Download]
en:phpsdk:start [2023/12/28 15:28]
michaelheumann [Changing the Server Endpoint]
Line 8: Line 8:
  
 ===== Download ===== ===== Download =====
-{{:phpsdk:girocheckout_sdk_2.1.23.zip|Download GiroCheckout PHP SDK 2.1.23}}+[[https://static.s-publicservices.de/sdks/php/girocheckout_sdk_2.3.14.zip|Download GiroCheckout PHP SDK 2.3.14]]
  
 +==== 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). 
 +[[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 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):
en/phpsdk/start.txt · Last modified: 2024/05/14 23:00