Arborescence des pages

Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

How to do

Before you can use VerifyInrolment's webservice and Payline's doAuthorization, the information you need to authenticate and implement SSL V3 secure HTTPS is required. 
In addition, a point of sale and a contract must be properly configured on the Payline Administration Center.
If you do not have a point-of-sale or a contract configured on the Administration Center, you must go to the Payline Administration Center:

...

https://homologation-admin.payline.com.

...

The following information is the essential data for using the "webservice" verifyEnrolment and doAuthorization:

  • The merchant ID: MerchantID
  • The access key to the Payline service: Accesskey


When making calls to Payline web services, the Merchand ID and the Merchant Access Key must be submitted to perform HTTP Authentication.
Web services calls will not be accepted if they are not correctly authenticated.

The authentication method used is called http Basic Authentication. If the merchant account ID is 1234567890 and your access key is DJMESHXYou6LmjQFdH, you must encode in base64 the value of 1234567890: DJMESHXYou6LmjQFdH.
The resulting string is to be added to the HTTP header as in the example below

  • L'identifiant commerçant : MerchantID
  • La clé d'accès au service Payline : Accesskey

Lorsque vous réalisez des appels aux services web Payline, l'identifiant de compte commerçant (Merchand ID) et la clé d'accès (Merchant Access Key) doivent être obligatoirement présentés pour réaliser une authentification http. Les appels web services ne seront pas acceptés s'ils ne sont pas correctement authentifiés.
La méthode d'authentification utilisée s'appelle http Basic Authentification. Si l'identifiant de compte commerçant est 1234567890 et votre clé d'accès est DJMESHXYou6LmjQFdH, vous devez encoder en base64 la valeur de
1234567890:DJMESHXYou6LmjQFdH. La chaîne obtenue est à ajouter à l'entête HTTP comme dans l'exemple ci-dessous :

Authorization: Basic MTIzNDU2Nzg5MdpESk1FU0hYWW91NkxtalFGZEg =


Ne communiquez jamais votre clé d'accès (Never share your Merchant Access Key ) à une tierce personne.
Payline utilise votre clé d'accès pour vous identifier en tant qu'expéditeur de vos demandes de paiement.
Aucun interlocuteur chez Payline ne la connaît et ne vous demandera cette information.
L'utilisation d'iframe n'est pas compatible avec une utilisation optimale et sécuritaire de Payline.

Exemple

with a third party. Payline uses your access key to identify you as the sender of your payment requests.
No one at Payline knows it and will not ask you for this information.
The use of iframe is not compatible with the optimal and safe use of Payline.

Example

In the header of the HTTP message, it is necessary to specify the value of the Authorization field. In this example, the value of the Authorization field is Basic MTExMTExMTExOkFGanU5WEhwbFF6dmFtZmZPNzJM.

If we decode MTExMTExMTExOkFGanU5WEhwbFF6dmFtZmZPNzJM (which is encoded in base64), we get the following valueDans l'entête du message HTTP, il est nécessaire de préciser la valeur du champ Authorization. Dans cet exemple, la valeur du champ Authorization est Basic MTExMTExMTExOkFGanU5WEhwbFF6dmFtZmZPNzJM.
Si l'on décode MTExMTExMTExOkFGanU5WEhwbFF6dmFtZmZPNzJM (qui est encodé en base64), nous obtenons la valeur suivante : 111111111: AFju9XHplQzvamffO72L (merchantID: AccessKey). L'ajout de la valeur authorization dans l'entête de la trame dépend de la technologie utilisée. Si vous utilisez un client web service, il est préférable d'opérer de la manière suivante

Adding the authorization value in the header of the frame depends on the technology used. If you are using a web service client, it is best to do the following:

Bloc de code
The Lalogin variable logintakes prendthe lavalue valeur duof merchantID 
The Lapassword variable passwordtakes prendthe lavalue valeurof dethe l'accessKey

 //Construction deBuild la requêtethe verifyEnrolment avecrequest leswith objetsthe payment, card etand orderRef objects
 $verifyEnrollmentRequest = array (
   'payment' => $this->payment($array['payment']),
   'card' => $this->card($array['card']),
   'orderRef' => $array['orderRef']
 );

 
//Construction de l'entete du Construct the header of the public message public$ $headerheader_soap;
 $this->header_soap = array();
 $this->header_soap['proxy_host'] = $this->proxy_host = PROXY_HOST;
 $this->header_soap['proxy_port'] = $this->proxy_port = PROXY_PORT;
 $this->header_soap['proxy_login'] = $this->proxy_login = PROXY_LOGIN;
 $this->header_soap['proxy_password'] = $this->proxy_password = PROXY_PASSWORD;
 $this->header_soap['login'] = $this->login = MERCHANT_ID;
 $this->header_soap['password'] = $this->password = ACCESS_KEY;
 $this->header_soap['style'] = SOAP_DOCUMENT;
 $this->header_soap['use'] = SOAP_LITERAL; 

 
// Creation de l'instance SoapClient qui va permettre l'appel du WebService
 // Déclaration du endPoint ainsi que du header
of the SoapClient instance which will allow the call of the WebService
// Declaration of the endPoint as well as the header
 $client = new SoapClient('https://services.payline.com/V4/services/DirectPaymentAPI', $this->header_soap); 

 //Appel Call duthe WebService
 $verifyEnrollmentResponse = $client->verifyEnrollment($verifyEnrollmentRequest); 

   Si vous n'utilisez pas de client services web, il faut alors ajouter dans l'entête la valeur en brut comme dans l'impression écran : Authorization : Basic

If you do not use a web services client, you must add in the header the raw value as in the screen print: Authorization: Basic MTExMTExMTExOkFGanU5WEhwbFF6dmFtZmZPNzJM