Arborescence des pages

Vous regardez une version antérieure (v. /display/DT/Start+with+Widget+Integration) de cette page.

afficher les différences afficher l'historique de la page

« Afficher la version précédente Vous regardez la version actuelle de cette page. (v. 2) afficher la version suivante »

Contenu


Changes may be made to the technical documentation. Unfinished items will be marked "under construction". Thank you for not taking it into account.


Payline

https://www.payline.com/en

Payline is a secure payment solution that manages 5,000 merchants. Composed of two distinct environments but ISO between them : 

  • The Production environment : It's the real world. All the real payment pass by the Production environement. All modification made on the production plateforme could impact seriously on the payment process.
  • The Sandbox environment :It's the test world. It allows all tests to be performed before going into production. It is necessary to ensure that the operation on this environment is optimal and meets expectations.

The platform allows to process payments. It is connected to many new ways of payment. Their integration is greatly simplified by using the Payline solution.



Integration processus


Here is how an integration takes place:

Step 1: Implementation of the payment solution, in accordance with the specifications.
Step 2: Validation of the integration and signature of the acceptance report.
Step 3: Monitoring transaction flows to detect a potential problem and fix it quickly.


Each integration lot must respect the 3 integration steps.


Lifecycle of a transaction


Payline uses web services to communicate with the merchant server. In a web payment, the doWebPayment web service is used. It triggers the opening of a payment session. After checking the data, Payline sends: 00000 if OK or an error code if KO.

Also in the return frame is the token associated with the transaction and the redirect URL if the redirection mode is used. Using the token, the widget is initialized and the shopper can proceed to the payment. At the end of the payment, the shopper is redirected to the "Return URL" provided in the doWebPayment call.

If the redirection fails, or if the shopper closes the page too early, we trigger a notification on the notification URL given in the doWebPayment call.



The call to the web service getWebPaymentDetail is triggered by the return on the "Return URL" or by the notification. In the getWebPaymentDetailResponse, the result and all the details of the transaction are sent. Then the payment session is closed, the payment made, the merchant can display the payment confirmation on his page.

Example transaction :

For a 1000€ travel, the buyer has to pay 30% of the total amount of down payment the day of booking and the rest 30 days before the trip.

The first payment (30% of the total amount) : 


draw.io

Erreur d'accès à la page source : la page associée au lien ci-dessous existe-t-elle?
/pages/viewpage.action?pageId=1383792809


SOAP Example
doWebPaymentRequestdoWebPaymentResponse
DoWebPayment Reequest
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:impl="http://impl.ws.payline.experian.com" xmlns:obj="http://obj.ws.payline.experian.com">
<soapenv:Header/>
<soapenv:Body>
<ns1:doWebPaymentRequest xmlns:ns2="http://obj.ws.payline.experian.com" xmlns:ns1="http://impl.ws.payline.experian.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:version>20</ns1:version> <!--PAYLINE VERSION WILL NOT CHANGE-->
<ns1:payment>
<ns2:amount>30000</ns2:amount><!--AMOUNT ORDER-->
<ns2:currency>978</ns2:currency><!--CURRENCY OF ORDER, WILL NOT CHANGE-->
<ns2:action>101</ns2:action><!--ACTION CODE, WILL NOT CHANGE-->
<ns2:mode>CPT</ns2:mode><!--MODE, WILL NOT CHANGE-->
<ns2:contractNumber>12345678</ns2:contractNumber><!--CONTRACT NUMBER BY DEFAULT, ALSO INDICATE THE POINT OF SELL USE-->
<ns2:differedActionDate xsi:nil="true"/>
<ns2:method xsi:nil="true"/>
<ns2:softDescriptor xsi:nil="true"/>
<ns2:cardBrand xsi:nil="true"/>
<ns2:registrationToken xsi:nil="true"/>
</ns1:payment>
<ns1:returnURL>http://localhost:8081/testpayment.html</ns1:returnURL><!--RETURN URL CALL AFTER PAYMENT-->
<ns1:cancelURL>http://localhost:8081/testpayment.html</ns1:cancelURL><!--URL CALL AFTER PAYMENT CANCEL-->
<ns1:order>
<ns2:ref>PAYLINETEST0003</ns2:ref><!--ORDER REFERENCE, /!\ MUST BE UNIQUE-->
<ns2:origin xsi:nil="true"/>
<ns2:country xsi:nil="true"/>
<ns2:taxes xsi:nil="true"/>
<ns2:amount>30000</ns2:amount><!--AMOUNT IN CENTS-->
<ns2:currency>978</ns2:currency><!--CURRENCY WILL NOT CHANGE-->
<ns2:date>07/01/2019 17:40</ns2:date><!--ORDER DATE FORMAT : /!\ DD/MM/YYYY HH/MM-->
<ns2:details/>
<ns2:deliveryTime xsi:nil="true"/>
<ns2:deliveryMode xsi:nil="true"/>
<ns2:deliveryExpectedDate></ns2:deliveryExpectedDate>
<ns2:deliveryExpectedDelay xsi:nil="true"/>
<ns2:deliveryCharge xsi:nil="true"/>
</ns1:order>
<ns1:notificationURL>http://localhost:8081/notif.php?merchantId=37334959742602</ns1:notificationURL><!--URL USE TO NOTIFY-->
<ns1:selectedContractList>
<ns2:selectedContract>12345678</ns2:selectedContract><!--CONTRACT LIST (CONTRACT HAVE TO BE ON THE SAME POINT OF SELL)-->
<ns2:selectedContract>AMEX2</ns2:selectedContract><!--CONTRACT LIST (CONTRACT HAVE TO BE ON THE SAME POINT OF SELL)-->
</ns1:selectedContractList>
<ns1:secondSelectedContractList xsi:nil="true"/>
<ns1:privateDataList/>
<ns1:languageCode xsi:nil="true"/>
<ns1:customPaymentPageCode xsi:nil="true"/>
<ns1:buyer><!--BUYER INFORMATION, PLEASE FILL A MAXIMUM OF DATA-->
<ns2:title>Mr</ns2:title>
<ns2:lastName></ns2:lastName>
<ns2:firstName>Jhon</ns2:firstName>
<ns2:email>jhon.doe@gmail.com</ns2:email>
<ns2:shippingAdress>
<ns2:title>office</ns2:title>
<ns2:name></ns2:name>
<ns2:firstName>Doe</ns2:firstName>
<ns2:lastName>Jhon</ns2:lastName>
<ns2:street1>1st street test</ns2:street1>
<ns2:street2 xsi:nil="true"/>
<ns2:cityName>testcity</ns2:cityName>
<ns2:zipCode>00000</ns2:zipCode>
<ns2:country>France</ns2:country>
<ns2:phone>0606060606</ns2:phone>
<ns2:state xsi:nil="true"/>
<ns2:county>France</ns2:county>
<ns2:phoneType>Mobile</ns2:phoneType>
</ns2:shippingAdress>
<ns2:billingAddress>
<ns2:title>office</ns2:title>
<ns2:name></ns2:name>
<ns2:firstName>Doe</ns2:firstName>
<ns2:lastName>Jhon</ns2:lastName>
<ns2:street1>1st street test</ns2:street1>
<ns2:street2 xsi:nil="true"/>
<ns2:cityName>testcity</ns2:cityName>
<ns2:zipCode>00000</ns2:zipCode>
<ns2:country>France</ns2:country>
<ns2:phone>0606060606</ns2:phone>
<ns2:state xsi:nil="true"/>
<ns2:county>France</ns2:county>
<ns2:phoneType>Mobile</ns2:phoneType>
</ns2:billingAddress>
<ns2:accountCreateDate>25/02/19</ns2:accountCreateDate><!--FORMAT : DD/MM/YY-->
<ns2:accountAverageAmount>40000</ns2:accountAverageAmount><!--ORDER AVERAGE AMOUNT OF THE ACCOUNT -->
<ns2:accountOrderCount>1</ns2:accountOrderCount><!--ACCOUNT ORDER COUNT-->
<ns2:walletId xsi:nil="true"/>
<ns2:walletDisplayed xsi:nil="true"/>
<ns2:walletSecured xsi:nil="true"/>
<ns2:walletCardInd xsi:nil="true"/>
<ns2:ip xsi:nil="true"/>
<ns2:mobilePhone xsi:nil="true"/>
<ns2:customerId>customer1</ns2:customerId><!--CUSTOMER ID HAVE TO BE FILLED /!\: email address/Number/etc.. -->
<ns2:legalStatus xsi:nil="true"/>
<ns2:legalDocument xsi:nil="true"/>
<ns2:birthDate>31/05/95</ns2:birthDate>
<ns2:fingerprintID xsi:nil="true"/>
<ns2:deviceFingerprint xsi:nil="true"/>
<ns2:isBot xsi:nil="true"/>
<ns2:isIncognito xsi:nil="true"/>
<ns2:isBehindProxy xsi:nil="true"/>
<ns2:isFromTor xsi:nil="true"/>
<ns2:isEmulator xsi:nil="true"/>
<ns2:isRooted xsi:nil="true"/>
<ns2:hasTimezoneMismatch xsi:nil="true"/>
</ns1:buyer>
<ns1:owner><!--OWNER INFORMATION, PLEASE FILL A MAXIMUM OF DATA-->
<ns2:lastName>Doe</ns2:lastName><!--test-->
<ns2:firstName>Jhon</ns2:firstName>
<ns2:billingAddress>
<ns2:street1>1st street test</ns2:street1>
<ns2:cityName>testcity</ns2:cityName>
<ns2:zipCode>00000</ns2:zipCode>
<ns2:country>France</ns2:country>
<ns2:phone>0606060606</ns2:phone>
</ns2:billingAddress>
<ns2:issueCardDate xsi:nil="true"/>
</ns1:owner>
<ns1:securityMode xsi:nil="true"/>
<ns1:recurring xsi:nil="true"/>
<ns1:customPaymentTemplateURL >https://homologation-webpayment.payline.com/v2/VQP7Vtq4BnY</ns1:customPaymentTemplateURL>
<ns1:contractNumberWalletList xsi:nil="true"/>
<ns1:merchantName>Name of the company</ns1:merchantName><!--MERCHANT NAME-->
<ns1:subMerchant>
<ns2:subMerchantId/>
<ns2:subMerchantName xsi:nil="true"/>
<ns2:subMerchantMCC/>
<ns2:subMerchantSIRET xsi:nil="true"/>
<ns2:subMerchantTaxCode xsi:nil="true"/>
<ns2:subMerchantStreet xsi:nil="true"/>
<ns2:subMerchantCity xsi:nil="true"/>
<ns2:subMerchantZipCode xsi:nil="true"/>
<ns2:subMerchantCountry xsi:nil="true"/>
<ns2:subMerchantState xsi:nil="true"/>
<ns2:subMerchantEmailAddress xsi:nil="true"/>
<ns2:subMerchantPhoneNumber xsi:nil="true"/>
</ns1:subMerchant>
<ns1:miscData/>
<ns1:asynchronousRetryTimeout/>
</ns1:doWebPaymentRequest>
</soapenv:Body>
</soapenv:Envelope>

DoWebPayment.XML

DoWebPayment RESPONSE
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<doWebPaymentResponse xmlns="http://impl.ws.payline.experian.com">
<result>
<code xmlns="http://obj.ws.payline.experian.com">00000</code><!--RETURN CODE. /!\ IF DIFFERENT TRANSACTION NOT ACCEPTED -->
<shortMessage xmlns="http://obj.ws.payline.experian.com">ACCEPTED</shortMessage><!--SHORT MESSAGE-->
<longMessage xmlns="http://obj.ws.payline.experian.com">Transaction approved</longMessage><!--LONG MESSAGE-->
</result>
<token>1EoqY10djYadWCd0R1921551111159804</token><!--TOKEN USE TO INITIALISE THE WIDGET-->
<redirectURL>https://homologation-webpayment.payline.com/v2/?token=1EoqY10djYadWCd0R1921551111159804</redirectURL><!-- /!\ NOT USED /!\ -->
</doWebPaymentResponse>
</soapenv:Body>
</soapenv:Envelope>

DoWebPaymentRESPONSE.XML

getWebPaymentDetailRequestgetWebPaymentDetailResponse
GetWebPaymentDetail REQUEST
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:impl="http://impl.ws.payline.experian.com">
    <soapenv:Header/>
    <soapenv:Body>
        <impl:getWebPaymentDetailsRequest>
            <impl:version>20</impl:version><!--PAYLINE VERSION WILL NOT CHANGE-->
            <impl:token>1EoqY10djYadWCd0R1921551111159804</impl:token><!--TOKEN OF TRANSACTION GIVEN IN THE DOWEBPAYMENT RESPONSE-->
        </impl:getWebPaymentDetailsRequest>
    </soapenv:Body>
</soapenv:Envelope>

GetWebPaymentDetail.XML

GetWebPaymentDetail RESPONSE
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <getWebPaymentDetailsResponse xmlns="http://impl.ws.payline.experian.com">
            <result>
                <code xmlns="http://obj.ws.payline.experian.com">00000</code><!-- RETURN CODE OF TRANSACTION. /!\ IF DIFFERENT TRANSACTION NOT ACCEPTED -->
                <shortMessage xmlns="http://obj.ws.payline.experian.com">ACCEPTED</shortMessage><!-- SHORT MESSAGE -->
                <longMessage xmlns="http://obj.ws.payline.experian.com">Transaction approved</longMessage><!-- LONG MESSAGE -->
            </result>
            <transaction>
                <id xmlns="http://obj.ws.payline.experian.com">19056172808935</id><!-- TRANSACTION ID IN PAYLINE -->
                <date xmlns="http://obj.ws.payline.experian.com">25/02/2019 17:28:08</date><!-- TRANSACTION DATE FORMAT : DD/MM/YYYY HH:MM:SS -->
                <isDuplicated xmlns="http://obj.ws.payline.experian.com">0</isDuplicated><!-- DUPLICATE TRANSACTION : 0 = NO / 1 = YES -->
                <isPossibleFraud xmlns="http://obj.ws.payline.experian.com">1</isPossibleFraud><!-- /!\ CALL LCLF RULE /!\ -->
                <fraudResult xmlns="http://obj.ws.payline.experian.com"/><!-- /!\ NOT USED /!\ -->
                <fraudResultDetails xmlns="http://obj.ws.payline.experian.com"><!-- /!\ NOT USED /!\ -->
                    <code>PAY001</code><!-- /!\ NOT USED /!\ -->
                    <shortMessage>Suspected fraud</shortMessage><!-- /!\ NOT USED /!\ -->
                    <longMessage>The transaction was detected as fraudulent</longMessage><!-- /!\ NOT USED /!\ -->
                </fraudResultDetails><!-- /!\ NOT USED /!\ -->
                <explanation xmlns="http://obj.ws.payline.experian.com">PAY001</explanation><!-- /!\ 3DS /!\ -->
                <threeDSecure xmlns="http://obj.ws.payline.experian.com">Y</threeDSecure><!-- /!\ 3DS /!\ -->
                <score xmlns="http://obj.ws.payline.experian.com">0</score><!-- /!\ 3DS /!\ -->
                <partnerAdditionalData xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><!-- /!\ 3DS /!\ -->
                <avs xmlns="http://obj.ws.payline.experian.com">
                    <result>4</result><!-- /!\ 3DS /!\ -->
                    <resultFromAcquirer/><!-- /!\ 3DS /!\ -->
                </avs><!-- /!\ 3DS /!\ -->
            </transaction>
            <payment><!-- PAYMENT DETAILS -->
                <amount xmlns="http://obj.ws.payline.experian.com">30000</amount>
                <currency xmlns="http://obj.ws.payline.experian.com">978</currency>
                <action xmlns="http://obj.ws.payline.experian.com">101</action>
                <mode xmlns="http://obj.ws.payline.experian.com">CPT</mode>
                <contractNumber xmlns="http://obj.ws.payline.experian.com">12345678_S</contractNumber>
                <differedActionDate xmlns="http://obj.ws.payline.experian.com"/>
                <method xmlns="http://obj.ws.payline.experian.com">CB</method>
                <cardBrand xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            </payment>
            <authorization><!-- AUTHORIZATION DETAILS -->
                <number xmlns="http://obj.ws.payline.experian.com">A55A</number>
                <date xmlns="http://obj.ws.payline.experian.com">25/02/2019 17:28:08</date>
            </authorization>
            <privateDataList/>
            <paymentRecordId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            <authentication3DSecure><!-- /!\ 3DS /!\ -->
                <md xmlns="http://obj.ws.payline.experian.com">1EPcpVBrVvS2sE5xfpAV</md><!-- /!\ 3DS /!\ -->
                <xid xmlns="http://obj.ws.payline.experian.com">MUVQY3BWQnJWdlMyc0U1eGZwQVY=</xid><!-- /!\ 3DS /!\ -->
                <eci xmlns="http://obj.ws.payline.experian.com">05</eci><!-- /!\ 3DS /!\ -->
                <cavv xmlns="http://obj.ws.payline.experian.com">AAABBUVncQAAAABXZmdxAAAAAAA=</cavv><!-- /!\ 3DS /!\ -->
                <cavvAlgorithm xmlns="http://obj.ws.payline.experian.com">2</cavvAlgorithm><!-- /!\ 3DS /!\ -->
                <vadsResult xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><!-- /!\ 3DS /!\ -->
            </authentication3DSecure><!-- /!\ 3DS /!\ -->
            <card><!-- CARD DETAILS -->
                <number xmlns="http://obj.ws.payline.experian.com">444433XXXXXX1111</number>
                <type xmlns="http://obj.ws.payline.experian.com">CB</type>
                <expirationDate xmlns="http://obj.ws.payline.experian.com">0223</expirationDate>
                <token xmlns="http://obj.ws.payline.experian.com">444433LfGjXu1111</token><!-- /!\ TOKEN USE FOR THE DOAUTHOR TRANSACTION /!\ -->
            </card>
            <extendedCard>
                <country xmlns="http://obj.ws.payline.experian.com"/>
                <isCvd xmlns="http://obj.ws.payline.experian.com"/>
                <bank xmlns="http://obj.ws.payline.experian.com"/>
                <type xmlns="http://obj.ws.payline.experian.com">CB</type>
                <network xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            </extendedCard>
            <order><!-- ORDER DETAILS -->
                <ref xmlns="http://obj.ws.payline.experian.com">PAYLINETEST0004</ref>
                <origin xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <country xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <taxes xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <amount xmlns="http://obj.ws.payline.experian.com">30000</amount>
                <currency xmlns="http://obj.ws.payline.experian.com">978</currency>
                <date xmlns="http://obj.ws.payline.experian.com">07/01/2019 17:40:00</date>
                <deliveryTime xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <deliveryMode xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <deliveryExpectedDate xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <deliveryExpectedDelay xmlns="http://obj.ws.payline.experian.com">0</deliveryExpectedDelay>
            </order>
            <media>Computer</media>
            <contractNumber>12345678_S</contractNumber><!-- CONTRACT NUMBER USED FOR TRANSACTION -->
            <subMerchant>
                <subMerchantId xmlns="http://obj.ws.payline.experian.com"/>
                <subMerchantName xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <subMerchantMCC xmlns="http://obj.ws.payline.experian.com"/>
                <subMerchantSIRET xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <subMerchantTaxCode xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <subMerchantStreet xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <subMerchantCity xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <subMerchantZipCode xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <subMerchantCountry xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <subMerchantState xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <subMerchantEmailAddress xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <subMerchantPhoneNumber xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            </subMerchant>
            <buyer><!-- BUYER DATA -->
                <title xmlns="http://obj.ws.payline.experian.com">Mr</title>
                <lastName xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <firstName xmlns="http://obj.ws.payline.experian.com">Jhon</firstName>
                <email xmlns="http://obj.ws.payline.experian.com">jhon.doe@gmail.com</email>
                <shippingAdress xmlns="http://obj.ws.payline.experian.com">
                    <title>office</title>
                    <name xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    <firstName>Doe</firstName>
                    <lastName>Jhon</lastName>
                    <street1>1st street test</street1>
                    <street2 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    <streetNumber xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    <cityName>testcity</cityName>
                    <zipCode>00000</zipCode>
                    <country>FR</country>
                    <phone>0606060606</phone>
                    <state xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    <county>France</county>
                    <phoneType>Mobile</phoneType>
                </shippingAdress>
                <billingAddress xmlns="http://obj.ws.payline.experian.com">
                    <title>office</title>
                    <name xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    <firstName>Doe</firstName>
                    <lastName>Jhon</lastName>
                    <street1>1st street test</street1>
                    <street2 xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    <streetNumber xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    <cityName>testcity</cityName>
                    <zipCode>00000</zipCode>
                    <country>FR</country>
                    <phone>0606060606</phone>
                    <state xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    <county>France</county>
                    <phoneType>Mobile</phoneType>
                </billingAddress>
                <accountCreateDate xmlns="http://obj.ws.payline.experian.com">25/02/19</accountCreateDate>
                <accountAverageAmount xmlns="http://obj.ws.payline.experian.com">40000</accountAverageAmount>
                <accountOrderCount xmlns="http://obj.ws.payline.experian.com">1</accountOrderCount>
                <walletId xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <walletDisplayed xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <walletSecured xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <walletCardInd xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <ip xmlns="http://obj.ws.payline.experian.com">172.22.119.11</ip>
                <mobilePhone xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <customerId xmlns="http://obj.ws.payline.experian.com">customer1</customerId>
                <legalStatus xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <legalDocument xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <birthDate xmlns="http://obj.ws.payline.experian.com"/>
                <fingerprintID xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <deviceFingerprint xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <isBot xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <isIncognito xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <isBehindProxy xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <isFromTor xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <isEmulator xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <isRooted xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                <hasTimezoneMismatch xsi:nil="true" xmlns="http://obj.ws.payline.experian.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
            </buyer>
        </getWebPaymentDetailsResponse>
    </soapenv:Body>
</soapenv:Envelope>

GetWebPaymentDetailRESPONSE.XML


  1. Return URL : The return URL is the URL of return after a payment. Usually, this page displays the payment success or failure information. The token is always passed in a parameter. When the user is redirected on this page, you have to call the getWebPaymentDetailRequest with the token pass in a parameter, and wait for the response before confirm or not the payment.
  2. Cancel URL : The cancel URL is used when a transaction is canceled. 

  3. Notification URL : The Notification URL is used if no getWebPaymentDetail request call is made. It is called and the token is passed as a parameter. Upon receipt of a notification on this URL, a getWebPaymentDetail request with the token must be issued by your server. This is an example of notification: http://localhost:8081/notif.php?notificationType=WEBTRS&token=1mGfbBP1u9l9QjJhh2441551272706113



Tips and tricks



  • The amount of transactions is in centimes. For example 1 is written 100 and 2 is written 200...
  • The order reference must be unique.
  • The status of the transaction is returned by the short message.
  • We do not process the collected data. However, when using the anti-fraud module, this data allows us to identify fraudulent profiles and block similar profiles. Also, passing this data from the beginning of the project will avoid going back through a development stage. This allows being more responsive in case of fraud.
  • An annulation must be done the day of the transaction before the bank remittance.
  • A refund can not be greater than the amount of the order.
  • A payment session expires after 15 minutes if no payment is made.



Back-end (.net core)


Download the package below : 

kitnet_4.44.1.zip 

PaylineSDK_4.52.dll 

The .NET SDK consists of the following:

  1. An example of a web application using the SDK;

  2. A library of functions that links the functions of the Payline API;

  3. An SDK configuration file;

  4. An installation instruction of the integration SDK;

  5. The WSDL file describing the web services offered by Payline.

Structure and functions 

Every web service Payline is composed of two files : 

  • One ASPX.CS file with the presentation form ;
  • One ASPX file gets the data sent by the user across the form. The C# code does the web service call.


For example :

The « doWebPayment » function (using to initiat a web payment using the SDK) : 

  • doWebPaymentForm.aspx This file simulates the checkout page. This is the first step in the web payment process. For testing the AmountCurrency and OrderRef can be edited.
  • doWebPayment.aspx.cs This file has the ASP code which get the data from the html form ABD use the library to initialise the web payment.

The Library

The SDKPayline class use SDKPayline.dll in the Bin repertory. This class describe a function for each web service using the same name : doWebPayment, do Authorisation. You have to update the file with the PaylineSDK_4.52.dll.

The parameter pass is described in each sample page of the SDK.

Configuration of the SDK



Once the SDK is install in the server the Resource.resx file as to be filled with the following configuration settings :



MERCHANT_ID

 Is the ID of your merchant account : 

URL and data are different between the homologation/sandbox environment and the production environment

In the Administration center : it's also the ID using to connect to the sandbox administration center and the prodution administration center 

ACCESS_KEY

Access key to connect to the Payline services 

URL and data are different between the homologation/sandbox environment and the production environment

In the Administration center : 

First step : 

Second step : 


Third step : 

If there is no access key clic on "Generate a new access key"

If there is already an access key clic on the view button and the access key will display (this function is only available in the sandbox environment)


PROXY_HOST

URL of the internet proxy

PROXY_PORT 

Communication port of the internet proxy

PROXY_LOGIN

User login

PROXY_PASSWORD

Password for the internet proxy

PROD 

Indicator with allow to call the sandbox platform or the production platform. To use the sandbox platform please keep the "false" value: 

<value>false</value>

PAYMENT_CURRENCY 

The ISO currency code to use by default for the payment: Codes ISO Currency

<data name="PAYMENT_CURRENCY" xml:space="preserve"> <value>978</value> <comment>Default payment currency (ex: 978 = EURO)</comment> </data>

ORDER_CURRENCY

The ISO currency code to use by default for the order: Codes ISO Currency

<data name="ORDER_CURRENCY" xml:space="preserve"> <value>PAYMENT_CURRENCY</value> </data>

SECURITY_MODE

The security mode by default :

<value>SSL</value>

LANGUAGE_CODE

The ISO code of the language  : 

<data name="LANGUAGE_CODE" xml:space="preserve"> <value>FR</value> <comment>Payline pages language</comment> </data>

PAYMENT_ACTION

The code of the payment method use by default : Codes - Action

<data name="PAYMENT_ACTION" xml:space="preserve"> <value>100</value> <comment>Default payment method</comment> </data>

Please use : 101

PAYMENT_MODE

The payment mode use by default :

<data name="PAYMENT_MODE" xml:space="preserve"> <value>CPT</value> <comment>Default payment mode</comment> </data>

CANCEL_URL

URL use if the payment is refused or if the user cancel the payment

NOTIFICATION_URL

Notification URL use by Payline to notify the end of transaction

RETURN_URL

Return URL use when a payment is OK

CUSTOM_PAYMENT_TEMPLATE_URL

URL of the dynamic template to use 

CUSTOM_PAYMENT_PAGE_CODE 

Personalisation code use by the payment pages

CONTRACT_NUMBER

The contract number to identify the point of sell 

CONTRACT_NUMBER_LIST

The list of contract to use (the contracts has to be on the same point of sell of the CONTRACT_NUMBER)

SECOND_CONTRACT_NUMBER_LIST 

The list of contract numbers to be displayed when the first payment attempt is a failure.

TERM_URL

Callback URL for the return of the ACS during 3D Secure transactions in direct mode



Front-end

Technical integration of the widget

The Widget integration (column / tab or Lightbox mode), takes place in only 3 big steps :

  1. Initialization of payment : from your server you use the DoWebPayment function of Web Payment API to initiate a payment on Payline payment pages.

  2. From web page, add a script and  <DIV> tag in body of your web page : Payline will use that tag to display the payment form.

  3. Payment Result : from your server you use the GetWebPaymentDetails function of  Web Payment API to get payment result.

The minimum HTML page for generating a payment form is as follows:

HTML Code
<html>
<head>
<link href="https://homologation-payment.payline.com/styles/widget-min.css" rel="stylesheet" /> 
<script src="https://homologation-payment.payline.com/scripts/widget-min.js">
</script>
</head>
<body>
<div>
<div id="PaylineWidget" data-token="the token obtained in doWebPayment Response" data-template="tab"> </div>
<button type="button" id="stop">CANCEL PAYMENT</button>
			<script>
			var cancel = document.getElementById('stop');
			cancel.onclick = function stop() {Payline.Api.endToken();
			window.location.href =Payline.Api.getCancelAndReturnUrls().cancelUrl;
			};
            </script>
<!-- The function stop() is triggered by the click on the cancel button. The function call the Payline.Api.endToken() which kill the token. The function also redirect the user on the cancel Url passed in the DoWebPayment request -->
</div>
</body>
</html>


URL are different between the homologation/sandbox environment and the production environment

The parameter of the widget : 

data token : The token obtained in doWebPayment response

data-auto-init : Defines whether the form should initialize as soon as the web page has finished loading (auto-init to "true"), or if it must wait for an initialization request (auto-init to "false")


Tab

Mobile

Tablette

Desktop


Customization of the widget

Rules 

  1. Always keep the original .css file in case of update : 

    .css file
    <link href="https://homologation-payment.payline.com/styles/widget-min.css" rel="stylesheet" />

    URL of the .css file are different between the homologation environment and the production environment

  2. Create your own .css file
  3. In this file always change the class and not the ID
  4. Use the "!important;" CSS function to force the parameter


Integration important information

  1. Cancel button : The cancel button will call the cancel url passed in the DoWebPayment Request. Example of code :

    	<button type="button" id="stop">CANCEL PAYMENT</button>
    			<script>
    			var cancel = document.getElementById('stop');
    			cancel.onclick = function stop() {Payline.Api.endToken();
    			window.location.href =Payline.Api.getCancelAndReturnUrls().cancelUrl;
    			};
                </script>
    <!-- The function stop() is triggered by the click on the cancel button. The function call the Payline.Api.endToken() which kill the token. The function also redirect the user on the cancel Url passed in the DoWebPayment request -->

    The cancel button must be add by the merchant

  2. When send the DoWebPayment REQUEST ? The DoWebPayment request must be executed when the user wants to pay. As a reminder, the order reference must be unique. To avoid too many calls to our server: The solution is to store the token and reuse it in case of updating. If the token is 3 minutes old then re-execute a DoWebPayment request. If the user rolls back and clicks the button again, we recommend running a new DoWebPayment request with the updated transaction information.
  3. When send the GetWebPaymentDetail REQUEST ? The GetWebPaymentDetail request must be executed as soon as a user arrives on the return URL. There is no need to run multiple GetWebPaymentDetail requests.


Integration example

Please download these files and put them in a server (local or not):  (avertissement)  PLEASE UPDATE THE URLS IN THE DOWEBPAYMENT REQUEST  (avertissement)

testpayment.html

cancelpayment.php

PaymentOK.php

test.php


You can now try the widget with a fresh token (a session expires after 15 minutes) :




Get a fresh token.

Call the testpayment.html page : 


In the form past the token :


The test.php page is called and the widget initialized with the token. you can analyze the code of the test.php page :


Enter your test card information or click on "CANCEL PAYMENT" to trigger the cancel function :

 


If you have entered your card data you will be redirected on the "Return URL" from the DoWebPayment REQUEST : 



If you have click on the CANCEL PAYMENT button, you will be redirected on the "CANCEL URL" from the DoWebPayment REQUEST.

  • Aucune étiquette