Implementation guide Web Services V4 Version 1.4b
Confidentiality All the information in the current document is considered confidential. Using it outside the context of this consultation or disclosing it to exterior persons is subject to prior approval by Lyra Network.
SUMMARY 1. Purpose... 1 2. Notions of timeout... 2 3. Error Handling... 3 4. Data Types definitions... 8 5. Maintain HTTP session... 9 6.... 10 7. API Use Cases and Examples... 11 7.1. 3D-Secure transaction process... 11 7.2. Create a transaction with 3D-Secure authentication (card enrolled)... 12 Verify the cardholder s enrolment status... 12 Redirect the cardholder to ACS... 14 Handle ACS Response... 16 Handle the authentication result and complete the transaction... 17 7.3. Create a transaction without 3D-Secure authentication... 18 7.4. Create a payment with 3D-Secure handled by merchant s MPI plugin... 20 7.5. Update a transaction... 22 7.6. Cancel a transaction... 23 7.7. Refund a transaction... 24 7.8. Duplicate a transaction... 25 7.9. Retrieve a transaction... 26 7.10. Validate a transaction... 27 8. Methods... 28 createwiththreeds()... 28 finalyzewiththreeds... 29 create()... 30 modify()... 31 cancel()... 33 refund()... 34 duplicate()... 36 getinfo()... 38 validate()... 39 force()... 40 9. Objects... 41 createpaymentinfo... 41 createpaymentgeneralinfo... 42 createcardinfo... 44 createsubpaymentinfo... 45 createcustomerinfo... 46 createshippinginfo... 47 createextrainfo... 48 paymentcreationinfo... 49 threedsresult... 50 custstatus... 52 deliveryspeed... 52 deliverytype... 52 extinfo... 52 createwiththreedsresponse... 53 verespareqinfo... 54 transactioninfo... 55 transactionpaymentgeneralinfo... 56 transactioncardinfo... 57 transactionthreedsinfo... 58
transactionauthorizationinfo... 60 transactionmarkinfo... 61 transactionwarrantydetailsinfo... 62 localcontrol... 63 transactioncaptureinfo... 64 transactioncustomerinfo... 65 transactionshippinginfo... 66 transactionextrainfo... 67 standardresponse... 68 10. Appendices... 69 Test credit card numbers... 69 Transaction statuses... 70 Bank response code (used for authresult and markresult).... 71.Net... 72 PHP Sample code : signature computation (create method)... 73
1. Purpose This document presents the standard Web services which allow you to create transactions (with or without 3D-Secure authentication) and to act on the transactions. Web services have been developed in accordance with the following SOAP protocol (Simple Object Access Protocol). The web service description language document for the service is available at https://paiement.systempay.fr/vads-ws/v4.3?wsdl In order to make exchanges secure, Web services (SOAP) are encrypted thanks to the HTTPS protocol. Moreover, a signature mechanism has been set up to validate and authenticate data exchange. @Lyra Network- 1/79
2. Notions of timeout A Web service request s processing is made of a series of asynchronous operations such as: sending of the request via the merchant site s network, transferring data across the Internet, payment s processing by the payment gateway, requesting the acquirer and the issuer, etc A connection failure may occur in every step and increase the process s runtime. A response can take a long time for several reasons: High response time from issuer bank s server, (foreign credit cards, period of high server load,...) high response time from acquirer bank s server when sending the authorization, high response time from merchant side during peaks in traffic, High response time from payment gateway. Internet Peering issues, etc... Depending how you have configured timeouts in your application, you can give up and close the connection, while the payment gateway is still processing your request. Be careful, a long response time must not be considered as a payment declined. You should configure your code to handle potential problems with connecting to the SOAP API. Best practices The average response time to handle a payment request is less than 5s. So, you should set client-side timeout to 20 to 30s. When a Web Service request exceeds the timeout limit time, you should not inform the shopper that the payment has been declined. If you do so, the shopper will try to make another payment while the first try is still in progress by the gateway. It would be better to choose one of the following solutions: 1. Inform the shopper that the payment is in progress. Asynchronously, ask the gateway for the status of the transaction. Then you can notify the shopper with the result of his purchase. 2. Inform the shopper that the payment has been declined Make sure you won t validate the transaction (suppose the payment to be created with manual validation). @Lyra Network- 2/ 79
3. Error Handling You can review the codes below to help troubleshoot your development efforts and fix any problems you might have. ErrorCode in a TransactionInfo Object: Error Error Error Message Error Message Code Code 0 Action successfully completed 62 Invalid input field orderinfo2 1 Unauthorized request 63 Invalid input field orderinfo3 2 TransactionID was not found 64 Invalid input field paymentsource 3 Bad transaction status 65 Invalid input field cardnetwork 4 Transaction already exists 66 Invalid input field contractnumber 5 Incorrect signature computation 67 Invalid input field customerid 6 TransmissionDate is too far from current UTC date 68 Invalid input field customertitle 10 Invalid input field amount 69 Invalid input field customername 11 Invalid input field currency 70 Invalid input field customerphone 12 Unknown card type 71 Invalid input field customermail 13 Invalid input field expirydate 72 Invalid input field customeraddress 14 Invalid input field cvv 73 Invalid input field customerzipcode 15 Unknown contract number 74 Invalid input field customercity 16 Invalid input field cardnumber 75 Invalid input field customercountry 17 CardIdent not found 76 Invalid input field customerlanguage 18 Invalid cardident (cancelled, ) 77 Invalid input field customerip 19 SubscriptionID was not found 78 Invalid input field customersendmail 20 Invalid Subscription 79 Invalid input field customermobilephone 21 CardIdent already exists 80 Invalid input field subpaiementtype 22 cardident creation declined 81 Invalid input field subreference 23 cardident purged 82 Invalid input field initialamount 26 Nothing has changed 83 Invalid input field occinitialamount 27 Amount not authorized 84 Invalid input field effectdate 40 Card range not found 85 Invalid input field state 50 Invalid input field siteid invalide 86 Invalid input field customeraddressnumber 51 Invalid input field transmissiondate 87 Invalid input field customerdistrict 52 Invalid input field transactionid 88 Invalid input field customerstate 53 Invalid input field ctxmode 90 Invalid input field enrolled 54 Invalid input field comment 91 Invalid input field authstatus 55 Invalid input field AutoNb 92 Invalid input field eci 56 Invalid input field AutoDate 93 Invalid input field xid 57 Invalid input field capturedate 94 Invalid input field cavv 58 Invalid input field newtransactionid 95 Invalid input field cavvalgo 59 Invalid input field validationmode 96 Invalid input field brand 60 Invalid input field orderid 98 Invalid input field requestid 61 Invalid input field orderinfo1 99 Unknown error @Lyra Network- 3/ 79
ErrorCode in a verespareqinfo object: Error Error Description Description Code Code 0 Action successfully completed 8 Invalid ACS Signature 1 Unauthorized request 9 Technical error 2 Incorrect signature computation 10 Wrong Parameter 3 Brand not found 11 Incorrect date format 4 Invalid card number 12 3DS Disabled 5 No suitable contract 13 cardident not found 6 Ambiguous contract 14 PAN not found 7 Merchant not enrolled 99 Unknown error PaymentError in a transactioninfo object Error Error Error Message Error Message Code Code 1 Transaction not found. 72 #N/A 2 Transaction not found. 73 Pre-authorization declined. 3 This action is not authorized on a transaction with the status {0}. 74 Invalid payment configuration. 4 This transaction is not authorized in this context. 75 The operation was declined by Paypal. 5 This transaction already exists. 76 A technical problem occurred. We are not able to process your request. 6 Invalid transaction amount. 77 Following a technical problem, we are not able to process your request. 7 This operation is no longer allowed for a transaction created on this date. 78 #N/A 8 The card expiry date does not allow this operation. 79 #N/A 9 CVV is compulsory for this card. 80 #N/A 10 The credit amount is higher than the initial amount. 81 The content of the configuration theme is not valid. 11 The credit amount is higher than the initial amount. 82 Refund is not authorized for this contract. 12 The duplication of a refund is not authorized. 83 Transaction amount outside the allowed values. 13 A technical problem occurred. We are not A technical problem occurred. We are not able to 84 able to process your request. process your request. 14 A technical problem occurred. We are not A technical problem occurred. We are not able to 85 able to process your request. process your request. 15 A technical problem occurred. We are not A technical problem occurred. We are not able to 86 able to process your request. process your request. 16 A technical problem occurred. We are not A technical problem occurred. We are not able to 87 able to process your request. process your request. 17 The remote setting of the Aurore contract A technical problem occurred. We are not able to 88 failed. process your request. 18 The analysis of the Cetelem response failed. 89 This modification is not authorized. 19 Unknown currency. 90 An error occurred during the refund of this transaction. 20 Invalid type of card. 91 No payment option enabled for this contract. 21 No contract found for this payment. Please change the data or contact your manager 92 #N/A in case of multiple failures. 22 POS not found. 93 #N/A 23 Ambiguous contract. 94 #N/A 24 Invalid contract. 95 A technical problem occurred. We are not able to process your request. 25 A technical problem occurred. We are not An error occurred during the capture of this 96 able to process your request. transaction. @Lyra Network- 4/ 79
25 A technical problem occurred. We are not able to process your request. 97 #N/A 26 Invalid card number. 98 Invalid transaction date. 27 Invalid card number. 99 #N/A 28 Invalid card number. 100 #N/A 29 Invalid card number. 101 Declined because the first installment has been declined. 30 Invalid card number. (Luhn) 102 The operation was declined by Buyster. 31 Invalid card number. (length) 103 The transaction status failed to be synchronized with the external system 32 Invalid card number. (not found) 104 An error occurred during the capture of this transaction. 33 Invalid card number. (not found) 105 A security error occurred when processing 3DS information for this transaction. 34 Card with unconditional authorization control failed. 106 Unsupported currency on this contract and/or shop. 35 E-carte bleue control failed. 107 #N/A 36 The risk control has caused a declined A technical problem occurred. We are not able to 108 transaction. process your request. 37 #N/A 109 #N/A 38 A technical problem occurred. We are not able to process your request. 110 Payment card not supported by the contract. 39 3-D Secure was declined for this transaction. 111 Refusal of transactions without liability shift. 40 A technical problem occurred. We are not able to process your request. 112 The cancellation is not authorized 41 A technical problem occurred. We are not able to process your request. 113 Duplication is not permitted 42 #N/A 114 Forcing is not authorized 43 #N/A 115 Refund is not authorized 44 It is not possible to force an imprint 116 MOTO payment is not authorized for this card 45 Invalid currency for this change. 118 Multiple installments are not authorized for this card 46 The amount exceeds the maximum authorized amount. 119 The date submitted is not valid 47 The presentation date that was requested is The option of payment of the initial transaction is not 120 later than the authorization's validity date. applicable 48 The required change is not valid. 121 #N/A 49 Invalid definition of multiple installment. 122 #N/A 50 Unknown POS. 123 #N/A 51 Unknown exchange rate. 124 #N/A 52 This contract was closed on {0}. 125 #N/A 53 The shop {0} is closed since {1}. 126 #N/A 54 This parameter that was rejected may include sensitive data {0}. 128 #N/A 55 A technical problem occurred. We are not able to process your request. 129 #N/A 57 Problem with the buyer account recovery. 130 #N/A 58 This buyer account is not compatible with this operation 131 #N/A 59 Problem with the buyer account recovery. 132 A technical problem occurred. We are not able to process your request. 60 This buyer account already exists. 133 #N/A 61 Invalid buyer ID. 134 #N/A 62 Creation of the buyer account declined. 135 The integration of the payment page into an iframe is not authorized. 63 This recurring payment already exists. 136 Refusal of the derived transactions, without liability shift on the primary transaction. 64 This recurring payment is already terminated. 137 #N/A 65 Invalid recurring payment. 138 #N/A 66 The rule of recurring payment is not valid. 139 #N/A 67 Creation of the recurring payment declined. 140 #N/A @Lyra Network- 5/ 79
69 A technical problem occurred. We are not able to process your request. 70 Invalid country code. 142 71 Invalid web service parameter. 141 The risk analyzer rejected this transaction. The used type of card is not valid for the requested payment mode. @Lyra Network- 6/ 79
Specification about TransactionInfo error codes 0 Action successfully completed This means that the request has been processed with success and therefore that the request's format is correct. Note: In case of a payment creation (create and createwiththreeds() method) this error code must not be mistaken with the transactionstatus field which returns the payment result. It is indeed possible to get a 0 errorcode and an 8 transactionstatus. This case matches with a transaction creation which authorization request has been declined. 1 Unauthorized request You do not have access to web services. Please contact Systempay support. 15 Unknown contract number Something is wrong with the merchant's contract. Several cases are possible: The value contained in the request does not match with any contract associated with the shop (siteid), There is no contract associated with the shop, The contract is closed, The type of contract is not allowed to process the payment. Occurs when your merchant account doesn t support CNP (card-not-present) transactions and the value of the field paymentsource is either MOTO, CC or OTHER in your payment request. 27 Amount not authorized The amount you want to debit or refund, doesn t match with your merchant account specifications (such as minimal and maximum amount allowed per transaction). Please contact Systempay support for more informations. Specification about verespareqinfo error codes 9 technical error This error code can be returned in several cases. Most frequently, the contract number (createcardinfo.contractnumber) provided in your request is invalid. Please contact Systempay support to obtain more details. @Lyra Network- 7/ 79
4. Data Types definitions Data Types are used to form a message type and either be populated by merchant (request) or by PayZen (Response). Data Representation Notations indicates how data is represented. Data Representation Notations Description a Alphabetic characters A--Z and a--z n Numeric digit 0-9 s Special character Alphabetic and numeric characters (excluding space and an special characters) ans Alphabetic, numeric, space and special characters Data Length Notations indicates the format of the data length. Data length Notations Description digit Fixed length in number of positions digit(s) Variable length, with maximum number of positions specified. Data types Description A Boolean data type can only have one of two values: true or false. boolean These values can also be represented as true, yes, or 1 (one), or false, no, or 0 (zero). A datetime data type represents a specific moment in time as both a date and a time. It contains a year, a month, and a date, and also hours, seconds, and milliseconds. datetime The value is in the Coordinated Universal Time (UTC). Unlike local time, any given date and time in UTC is the same everywhere on earth simultaneously. Int Long String An int (integer) data type is a whole number without a decimal point or any value that would follow a decimal point. For example, 1 is an integer. However, 1.0 and 1. are not integers. The long data type is a 64-bit signed two's complement integer. This data type is used when the int data type is not large enough (to specify transaction amount for example). The string data type can contain characters, line feeds, carriage returns, and tab characters. @Lyra Network- 8/ 79
5. Maintain HTTP session Important: As the payment platform architecture works with load balanced servers, on a short time interval it is necessary that every request concerning the same payment are processed on the same HTTP session in order to keep the process' continuity. To do so, for each request a session is created by the server. The session ID is sent back in the HTTP header of the response. It has to be sent back within the following requests in order that they can be processed by the same server. JAVA code sample Use the SESSION_MAINTAIN_PROPERTY property and make sure to set it to true in order to maintain the session. Service service = Service.create(wsdlURL, qname); ThreeDSecure port = service.getport(threedsecure.class); ((BindingProvider) port).getrequestcontext().put(bindingprovider.session_maintain_property, true); PHP code sample First of all, you need to get the SESSION ID sent back in the response of the first call. Use the getlastresponseheader method and save the cookie named JSESSIONID. Then use the setcookie method to add the JSESSIONID cookie in the header of each call of a series of API calls. /* Get all the response headers */ $header = $client-> getlastresponseheaders(); /* Find the «JSESSIOND» field : */ if(!preg_match("#jsessionid=([a-za-z0-9\._]+)#",$header, $matches)){ return "NO SESSIONID SENT BY THE SERVER." ; //technical error } $cookie = $matches[1]; /*Add a new cookie in the header of the next request */ $client-> setcookie ("JSESSIONID", $cookie); We recommend you to store the JSESSIONID in your data base. You will have to send it in your request to finalize the payment after a 3D-Secure authentication. The payer authentication may take a few minutes. @Lyra Network- 9/ 79
6. A certificate is mandatory to communicate with the payment gateway. It is available for every person who have the right to view your shop's certificates. They appear in PayZen's Merchant Back Office in Setting / Shops, Certifcates tab. There are two distinct certificates: one for the test platform and the other for the production platform. The signature is computed as follows: Creation of a string composed of the parameters separated with the "+" symbol. Addition of the "certificate" (test or production depending on the context) to this string. Hash of the final string with the SHA1algorithm. The payment gateway always checks the signature. It is on the merchant's responsibility to check the signature returned by the payment gateway. The order of the fields must be respected. The numerical fields must not have any 0 on the first digit's left. The boolean fields can only take these two values: - 1 for true - 0 for false The string fields that are not valued must be left empties. To simplify the computation, object of class datetime are not taken in account. On TEST mode, if the signature's computation is not correct, the error code returns 5. The string used to compute the signature on the server's side is then returned in the extendederrorcode field. @Lyra Network- 10/ 79
7. API Use Cases and Examples 7.1. 3D-Secure transaction process Step 1 - Shopper browses at merchant site and finalizes purchase. Step 2 - The merchant invokes a web service (createwiththreeds request) to the PayZen gateway with the necessary data to process the payment. Step 3 - PayZen sends query including card number to VISA or MASTERCARD Directory Servers. Step 4 - If card number is not participating, PayZen process the authorization request and returns a transactioninfo object to merchant and processing ends. If card number is in a participating card range, Systempay returns a verespareqinfo object containing: - the Access Control Server (ACS) URL - the Payer Authentication Request message (PAReq) - the 3DS request ID (threedsrequestid) Step 5 - The merchant stores in the field MD (merchant data), the session ID (JSESSIONID) transmitted in the HTTP response header, and the 3DS request ID (threedsrequestid). Step 6 - The merchant initiates a form post (ACS Request) that posts the values retrieved from verespareqinfo to the ACS via the shopper s browser, including the field MD. It is at this stage that the card holder will be prompted for their 3D-Secure PIN code. Step 7 - ACS authenticates shopper as appropriate for the card number then formats the ACS Result message. Step 8 - ACS returns the ACS result (PARes) and the merchant data (MD) to merchant via shopper s browser. Step 9 - The merchant invokes a web service (finalizewiththreeds) to the PayZen gateway with the 3DS request ID (transmitted in the field MD) and the ACS Result (PARes). Step 10 - PayZen validates Payer Authentication Response signature. If successful, PayZen proceeds with authorization exchange with acquirer. Step 11 - PayZen returns a transactioninfo object to merchant and processing ends. @Lyra Network- 11/ 79
7.2. Create a transaction with 3D-Secure authentication (card enrolled) Verify the cardholder s enrolment status 1. Create a new createpaymentinfo objet. 2. Populate at least all of the required fields for the paymentgeneralinfo object. 3. Populate at least all of the required fields for the cardinfo object. 4. Populate at least all of the required fields for the extrainfo object. 5. If you need, you can use some optional fields. Refer to the createwiththreeds method description s section. 6. Proceed with the signature computation (see below). 7. Call the createwiththreeds() method, passing in the createpaymentinfo object created in the previous steps and the wssignature field. 8. Systempay returns a createwiththreedsreponse object. Check for the value of the errorcode field. o If the errorcode value is 0, o o o o Get the verespareqinfo object from the response. Get the JSESSIONID cookie from the HTTP headers of the response. Proceed with the browser redirection to the ACS (refer to next section) If the errorcode value is not 0, then process the errors. wssignature = SHA1(siteId+transactionId+paymentSource+orderId+orderInfo+orderInfo2+orderInfo3 +amount+currency+validationmode+cardnumber+cardnetwork+expirymonth +expiryyear+cvv+cardident+cardbirthday+contractnumber+paymentoptioncode +subpaymentinfo+custormerinfo+shippinginfo +ctxmode+browesruseragent+browseraccept+certificate) wssignature = SHA1(70258842+420582+EC+cmde-test+++ +12590+978+1+4970100000000009+VISA+12 +2021+111++++ +++ +TEST+++certificate) @Lyra Network- 12/ 79
SOAP Request example <ns1:createwiththreeds> <createinfo> <paymentgeneralinfo> <siteid>70258842</siteid> <transmissiondate>2014-03-11t10:40:58+00:00</transmissiondate> <transactionid>420582</transactionid> <paymentsource>ec</paymentsource> <orderid>cmde-test</orderid> <amount>12590</amount> <currency>978</currency> <presentationdate>2014-03-11t10:40:58+00:00</presentationdate> <validationmode>1</validationmode> </paymentgeneralinfo> <cardinfo> <cardnumber>4970100000000009</cardnumber> <cardnetwork>visa</cardnetwork> <expirymonth>12</expirymonth> <expiryyear>2021</expiryyear> <cvv>111</cvv> </cardinfo> <extrainfo> <ctxmode>test</ctxmode> </extrainfo> </createinfo> <wssignature>8696c57d909498c2a0d1b7dbc2daea98c85f346b</wssignature> </ns1:createwiththreeds> Response header [Response Header] HTTP/1.1 200 OK Date: Tue, 11 Mar 2014 10:40:58 GMT Server: Apache Set-Cookie: JSESSIONID=2B42D2D1A7A0F34598113A7534D2844A.bdxvad2;Path=/vads-ws;Secure; HttpOnly Access-Control-Allow-Origin: * Vary: Accept-Encoding,User-Agent Connection: close Transfer-Encoding: chunked Content-Type: text/xml;charset=utf-8 SOAP Response example <ns1:createwiththreedsresponse xmlns:ns1='http://v4.ws.vads.lyra.com/'> <return> <errorcode>0</errorcode> <timestamp>1394534458504</timestamp> <signature>5e9bc4c4145d59297f7f6a1534629075832c1067</signature> <verespareqinfo> <errorcode>0</errorcode> <signature>5755b5cdd881527ed355b917fb6b37db9335ff1f</signature> <timestamp>1394534458504</timestamp> <threedsacctid>aee5962cddb048aab650bac6f7d1</threedsacctid> <threedsacsurl>https://paiement.systempay.fr:443/vadspayment/acs.interactive_authenticate.a</threedsacsurl> <threedsbrand>visa</threedsbrand> <threedsencodedpareq> ejxvutty4jam/zvm3s4oribdr2szaok+il1s83cgaibyhjxj7gpkkkowv4wl/pfkyxpc+s0aymli5fky0e= </threedsencodedpareq> <threedsenrolled>y</threedsenrolled> <threedsrequestid>_c13b0d69-ad0e-4fa1-926f-23cc90b723c0</threedsrequestid> </verespareqinfo> </return> </ns1:createwiththreedsresponse> @Lyra Network- 13/ 79
Redirect the cardholder to ACS Once the verespareqinfo received, you have to redirect the browser to the ACS by means of a form POST submitted automatically. This form POST is sent to the ACS s url received in the createwiththreeds response (threedsacsurl). <form method= POST action= threedsacsurl value > </form> It must contain the fields below: Name PaReq String TermUrl String MD Data Type Description String Payer Authentication Request. This is the threedsencodedpareq variable in the createwiththreeds response. (see verespareqinfo object) The TermUrl is the url that the card holder will get redirected to once the ACS has completed authentication. (see next section) Merchant DATA. In this field, you can send some data needed after the authentication to identify the customer and resume the process. We recommend to populate it with a combination of the JSESSIONID and the threedsrequestid, separated by a + character : JSESSIONID+requestId Mandatory Field Example: Note for test mode ONLY In test mode, you have to send the JSESSIONID when redirecting the browser to the ACS s test URL in order to maintain HTTP session. To do so, you have to add the JSESSIONID to the ACS s URL, separated by a semi column character as shown below: ${URL};jsessionid=${session} <form name="form" method="post" action="https://paiement.systempay.fr/vadspayment/acs.silent_authenticate.a;jsessionid=b420bf68835f6563fb6e4b289abb9080.bdxvad3" >... </form> When working in LIVE MODE, you MUST NOT SEND the JSESSIONID to the ACS. @Lyra Network- 14/ 79
Example <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> <title>---</title> <script type="text/javascript"> <!-- function submitform(){ document.redirectform.submit(); } --> </script> </head> <body onload="settimeout(\'submitform()'.'\',500);"> <span class="message">redirection ACS</span> <br/> <br/> <br/> <form name="redirectform" action="acsurl" method="post"> <input type="hidden" name="pareq" value=" threedsacsurl "/> <input type="hidden" name="termurl" value="url_de_retour"/> <input type="hidden" name="md" value="threedsrequestid " /> <noscript><input type="submit" name="go" value="click to continue"/></noscript> </form> </body> </html> @Lyra Network- 15/ 79
Handle ACS Response Once submitting the Payer authentication request, the ACS server will authenticating the request and redirect to page passed as TermUrl in the above section. On the redirected page, you will find: PaRes : PARes message (Payer Authentication Response) MD : Merchant Data sent in the request You have to extract from the field MD the values of Jsession ID and threedsrequestid. Pass these values to call finalizewiththreeds method (see next section). Example of TermUrl page: In the following example, the field MD consists of the Jsession ID and the request ID, separated by the character +. <?php session_start();?> <html> <head></head> <body> <?php $PaRes = $_POST['PaRes']; List($JSESSIONID, $requestid) = explode («+», $_POST['MD']) ; //Initialiaation du client SOAP $client = new soapclient($wsdl,array('trace' =>1)); //Définition du cookie qui sera envoyé avec la requête SOAP $client-> setcookie('jsessionid', $JSESSIONID); finalizewiththreeds function call </body> </html> @Lyra Network- 16/ 79
Handle the authentication result and complete the transaction 1. Get the PaRes message and the field MD sent to your TermUrl. 2. Extract the value of JSESSIONID and threedsrequestid form the field MD. 3. Proceed with the signature computation. 4. Set a new cookie called JSESSIONID with the value extracted previously and call the finalyzewithtreeds() method, passing in threedsrequestid and pares field. 5. Systempay returns a transactioninfo object. Check for the value of the errorcode field. o o If the errorcode value is 0, read the other values returned in the transactioninfo object such as transactionstatuslabel. If the errorcode value is not 0, then process the errors. wssignature = SHA1(threeDSRequestId+pares+certificate) Request header [Request Header] POST /vads-ws/v4.3 HTTP/1.1 Host: paiement.systempay.fr Connection: Keep-Alive User-Agent: PHP-SOAP/5.4.14 Content-Type: text/xml; charset=utf-8 SOAPAction: "" Content-Length: 5332 Cookie: JSESSIONID=F51526885F7C69B419344A577959C9BA.bdxvad2; SOAP Request example <ns1:finalizewiththreeds> <threedsrequestid>_cc563079-1ac6-48d6-b07d-3eb3618cb0df</threedsrequestid> <pares>ejznwdmszv2xwkt237ljp9dzctesdnagpd/xyxfy58h+bbdankg1ufuxbwk/wqdnbdn</pares> <wssignature>e92d7e22d10076c4e67fbadc631c6a2898c43eac</wssignature> </ns1:finalizewiththreeds> @Lyra Network- 17/ 79
7.3. Create a transaction without 3D-Secure authentication 1. Create a new paymentcreationinfo objet. 2. Populate at least all of the required fields for the paymentgeneralinfo object. 3. Populate at least all of the required fields for the cardinfo object. 4. Do not populate the threedsresult object. 5. Populate at least all of the required fields for the extrainfo object. 6. If you need, you can use some optional fields. Refer to the create method description s section. 7. Proceed with the signature computation (see below). 8. Call the create() method, passing in the paymentcreationinfo object created in the previous steps and the wssignature field. 9. Systempay returns a transactioninfo object. Check for the value of the errorcode field. o o If the errorcode value is 0, read the other values returned in the transactioninfo object such as transactionstatuslabel. If the errorcode value is not 0, then process the errors. Example This example show how to create a payment without 3D-Secure authentication. validationmode and presentationdate are used as optional fields. threedsresult, subpaymentinfo, customerinfo, shippinginfo are not populated in the request. Their value in the signature computation will be empty. wssignature = SHA1(siteId+transactionId+paymentSource+orderId+orderInfo+orderInfo2+orderInfo3 +amount+currency+validationmode+cardnumber+cardnetwork+expirymonth +expiryyear+cvv+cardident+cardbirthday+contractnumber+paymentoptioncode +threedsresult+subpaymentinfo+custormerinfo+shippinginfo +ctxmode+browesruseragent+browseraccept+certificate) wssignature = SHA1(70258842+361145+EC+cmde-test+++ +12500+978+1+4970100000000009+VISA+12 +2021+111++++ ++++ +TEST+++certificate) @Lyra Network- 18/ 79
SOAP Example <ns1:create> <createinfo> <paymentgeneralinfo> <siteid>70258842</siteid> <transmissiondate>2014-03-11t09:46:56+00:00</transmissiondate> <transactionid>388160</transactionid> <paymentsource>ec</paymentsource> <orderid>cmde-test</orderid> <amount>12500</amount> <currency>978</currency> <presentationdate>2014-03-13t09:46:56+00:00</presentationdate> <validationmode>1</validationmode> </paymentgeneralinfo> <cardinfo><cardnumber>4970100000000009</cardnumber> <cardnetwork>visa</cardnetwork> <expirymonth>12</expirymonth> <expiryyear>2021</expiryyear> <cvv>111</cvv> </cardinfo> <extrainfo> <ctxmode>test</ctxmode> </extrainfo></createinfo> <wssignature>97fd9257bb87ae03dcf58660b2292ee2e6761558</wssignature> </ns1:create> @Lyra Network- 19/ 79
7.4. Create a payment with 3D-Secure handled by merchant s MPI plugin 1. Create a new paymentcreationinfo objet. 2. Populate at least all of the required fields for the paymentgeneralinfo object. 3. Populate at least all of the required fields for the cardinfo object. 4. Populate at least all of the required fields for the threedsresult object with the result of the payer authentication performed by the merchant: threedsbrand threedsenrolled threedsstatus, only if threedsenrolled = Y threedsxid, only if threedsenrolled = Y threedseci, only if threedsenrolled = Y AND threedsstatus = Y or A threedscavv, only if threedsenrolled = Y AND threedsstatus = Y or A threedscavvalgorithm, only if threedsenrolled = Y AND threedsstatus = Y or A 5. Populate at least all of the required fields for the extrainfo object. 6. If you need, you can use some optional fields. Refer to the create method description s section. 7. Proceed with the signature computation (see below). 8. Call the create() method, passing in the paymentcreationinfo object created in the previous steps and the wssignature field. 9. Systempay returns a transactioninfo object. Check for the value of the errorcode field. o o If the errorcode value is 0, read the other values returned in the transactioninfo object such as transactionstatuslabel. If the errorcode value is not 0, then process the errors. Example This example show how to create a payment after the payer has been successfully authenticated by the ACS. validationmode and presentationdate are used as optional fields. subpaymentinfo, customerinfo, shippinginfo are not populated in the request. Their value in the signature computation will be empty. wssignature = SHA1(siteId+transactionId+paymentSource+orderId+orderInfo+orderInfo2+orderInfo3 +amount+currency+validationmode+cardnumber+cardnetwork+expirymonth +expiryyear+cvv+cardident+cardbirthday+contractnumber+paymentoptioncode +threedsbrand+threedsenrolled+threedsstatus+threedseci+threedsxid +threedscavv+threedscavvalgorithm+subpaymentinfo+custormerinfo+shippinginfo +ctxmode+browesruseragent+browseraccept+certificate) wssignature = SHA1(70258842+706338+EC+cmde-test+++ +12500+978+1+4970100000000009+VISA+12 +2021+111++++ +VISA+Y+Y+05+VXJjeXY0VXZWUjRsWWJaOUo4b3A= +Q2F2dkNhdnZDYXZ2Q2F2dkNhdnY=+2+++ +TEST+++certificate) @Lyra Network- 20/ 79
SOAP Example <ns1:create> <createinfo> <paymentgeneralinfo> <siteid>70258842</siteid> <transmissiondate>2014-03-10t15:59:54+00:00</transmissiondate> <transactionid>611949</transactionid> <paymentsource>ec</paymentsource> <orderid>cmde-test</orderid> <amount>12500</amount> <currency>978</currency> <presentationdate>2014-03-12t15:59:54+00:00</presentationdate> <validationmode>1</validationmode> </paymentgeneralinfo> <cardinfo> <cardnumber>4970100000000009</cardnumber> <cardnetwork>visa</cardnetwork> <expirymonth>12</expirymonth> <expiryyear>2021</expiryyear> <cvv>111</cvv> </cardinfo> <threedsresult> <threedsbrand>visa</threedsbrand> <threedsenrolled>y</threedsenrolled> <threedsstatus>y</threedsstatus> <threedseci>05</threedseci> <threedsxid>vxjjexy0vxzwujrswwjaouo4b3a=</threedsxid> <threedscavv>q2f2dknhdnzdyxz2q2f2dknhdny=</threedscavv> <threedscavvalgorithm>2</threedscavvalgorithm> </threedsresult> <extrainfo> <ctxmode>test</ctxmode> </extrainfo> </createinfo> <wssignature>fb1c4815471154737d10179cb33b6794e55db905</wssignature> </ns1:create> @Lyra Network- 21/ 79
7.5. Update a transaction The following fields are required: siteid transmissiondate transactionid sequencenumber ctxmode amount currency presentationdate validate comment wssignature SOAP Code <ns1:modify> <siteid>70258842</siteid> <transmissiondate>2013-05-16t08:09:22+00:00</transmissiondate> <transactionid>965805</transactionid> <sequencenumber>1</sequencenumber> <ctxmode>test</ctxmode> <amount>15800</amount> <currency>978</currency> <presentationdate>2013-05-16t08:09:22+00:00</presentationdate> <validate>true</validate> <comment></comment> <wssignature>532bfc85fac7b4af69323e9026806b5392019c62</wssignature> </ns1:modify> wssignature = SHA1(siteId+transactionId+sequenceNumber+ctxMode +amount+currency+validate+comment+certificate) @Lyra Network- 22/ 79
7.6. Cancel a transaction The following fields are required: siteid transmissiondate transactionid sequencenumber ctxmode comment wssignature SHA1 (siteid+transactionid+sequencenumber+ctxmode+comment+certificate) SOAP Example <ns1:cancel> <siteid>70258842</siteid> <transmissiondate>2014-03-07t14:15:19+00:00</transmissiondate> <transactionid>549195</transactionid> <sequencenumber>1</sequencenumber> <ctxmode>test</ctxmode> <comment/> <wssignature>c67470864c0dc0f2dfbfdd28e45c5e4e3b4c6e84</wssignature> </ns1:cancel> SOAP Example Response <ns1:cancelresponse xmlns:ns1='http://v4.ws.vads.lyra.com/'> <return> <timestamp>1394204107971</timestamp> <signature>37aac278bf5e6f305708aebf7873742a620c2771</signature> <errorcode>0</errorcode> <transactionstatus>9</transactionstatus> </return> </ns1:cancelresponse> @Lyra Network- 23/ 79
7.7. Refund a transaction The following fields are required: siteid transmissiondate transactionid sequencenumber ctxmode newtransactionid amount currency presentationdate comment wssignature wssignature = SHA1 (siteid+transactionid+sequencenumber+ctxmode +newtransactionid+amount+currency+validationmode +comment+certificate) SOAP Example <ns1:refund> <siteid>70258842</siteid> <transmissiondate>2014-03-07t15:21:02+00:00</transmissiondate> <transactionid>594750</transactionid> <sequencenumber>1</sequencenumber> <ctxmode>test</ctxmode> <newtransactionid>570152</newtransactionid> <amount>90</amount> <currency>978</currency> <presentationdate>2014-03-10t14:50:15+00:00</presentationdate> <validationmode>1</validationmode> <comment>remboursement partiel</comment> <wssignature>c6e8cf8b4445e9a8c263d8702861261fb0ef59b0</wssignature> </ns1:refund> @Lyra Network- 24/ 79
7.8. Duplicate a transaction The following fields are required: siteid transmissiondate transactionid sequencenumber ctxmode orderid orderinfo (can be empty) orderinfo2 (can be empty) orderinfo3 (can be empty) amount currency newtransactionid presentationdate validationmode comment wssignature wssignature = SHA1(siteId+transactionId+sequenceNumber+ctxMode+orderId+orderInfo +orderinfo2+orderinfo3+amount+currency+newtransactionid+validationmode +comment+certificate) SOAP Example <ns1:duplicate> <siteid>70258842</siteid> <transmissiondate>2014-03-07t14:15:19+00:00</transmissiondate> <transactionid>549195</transactionid> <sequencenumber>1</sequencenumber> <ctxmode>test</ctxmode> <orderid>cmde-test</orderid> <orderinfo/> <orderinfo2/> <orderinfo3/> <amount>34000</amount> <currency>978</currency> <newtransactionid>625424</newtransactionid> <presentationdate>2014-03-07t16:22:22+00:00</presentationdate> <validationmode>1</validationmode> <comment/> <wssignature>da962cd70b7121dbedfd6b7a44ac580e66f17614</wssignature> </ns1:duplicate> @Lyra Network- 25/ 79
7.9. Retrieve a transaction The following fields are required: siteid transmissiondate transactionid sequencenumber ctxmode wssignature wssignature = SHA1 (siteid+transactionid+sequencenumber+ctxmode+certificate) SOAP Example <ns1:getinfo> <siteid>70258842</siteid> <transmissiondate>2014-03-07t14:15:19+00:00</transmissiondate> <transactionid>549195</transactionid> <sequencenumber>1</sequencenumber> <ctxmode>test</ctxmode> <wssignature>e0823f7326d94d09878495bccc2e9e1472ff5ad9</wssignature> </ns1:getinfo> @Lyra Network- 26/ 79
7.10. Validate a transaction The following fields are required: siteid transmissiondate transactionid sequencenumber ctxmode comment wssignature wssignature = SHA1 (siteid+transactionid+sequencenumber+ctxmode+comment+certificate) SOAP Example <ns1:validate> <siteid>70258842</siteid> <transmissiondate>2014-03-07t16:31:15+01:00</transmissiondate> <transactionid>594750</transactionid> <sequencenumber>1</sequencenumber> <ctxmode>test</ctxmode> <comment/> <wssignature>2b2a2775b8ddf9525d034ba32dd2313ad9801bd1</wssignature> </ns1:validate> SOAP Example Response <ns1:validateresponse xmlns:ns1='http://v4.ws.vads.lyra.com/'> <return> <timestamp>1394206294707</timestamp> <signature>05d9f8a28a740df9f55b9b4996997c962a6169ae</signature> <errorcode>0</errorcode> <transactionstatus>4</transactionstatus> </return> </ns1:validateresponse> @Lyra Network- 27/ 79
8. Methods createwiththreeds() Use createwiththreeds() to verify if cardholder participates in 3D-Secure program, and generates the Payer Authentication Request message. If cardholder is not enrolled, PayZen submits a traditional authorization request and create a new transaction. Arguments Mandatory Name Data Type Description Field createinfo createpaymentinfo Payment request message wssignature String Signature (see below) Use the following fields in this order: createpaymentinfo.paymentgeneralinfo, createpaymentinfo.cardinfo, createpaymentinfo.subpaymentinfo, createpaymentinfo.customerinfo, createpaymentinfo.shippinginfo, createpaymentinfo.extrainfo Returns Returns a createwiththreedsresponse object. If the card is enrolled, the response contains a verespareqinfo object. Otherwise, the response contains a transactioninfo object. @Lyra Network- 28/ 79
finalyzewiththreeds() Use finalyzewiththreeds() to: return the response from 3D-Secure server, back to the payment gateway complete the transaction Arguments Name threedsrequestid Data Type String Description This is the threedsrequestid (extracted from the MD parameter returned from ACS Server) pares String Returned parameter from ACS Server Mandatory Field wssignature String Signature (see below) Use the following fields in this order: threedsrequestid, pares Returns Returns a transactioninfo object. Note : The PARes message can contain newline characters ( CR, LF ou \r, \n ). Some systems replace these characters by a LF character in the SOAP message. It is the case in particular in ASP.NET To avoid signature computation problem, we recommend to delete newline characters and white spaces, both finalyzewiththreeds request and in the signature computation. This does not alter the integrity of the PARes message. @Lyra Network- 29/ 79
create() Use create() to create: a single payment without 3D-Secure authentication a single payment with 3D-Secure handled by merchant s MPI plugin a payment by ID without 3D-Secure a payment by ID with 3D-Secure handled by merchant s MPI plugin. Arguments Mandatory Name Data Type Description Field createinfo paymentcreationinfo Payment request message wssignature String Signature (see below) Use the following fields in this order: paymentcreationinfo.paymentgeneralinfo, paymentcreationinfo.cardinfo, paymentcreationinfo.threedsresult, paymentcreationinfo.subpaymentinfo, paymentcreationinfo.customerinfo, paymentcreationinfo.shippinginfo, paymentcreationinfo.extrainfo Returns Returns a transactioninfo object. @Lyra Network- 30/ 79
modify() Use modify() to: modify the amount of a transaction (only with a smaller value) modify the day of capture validate the transaction Transactions must have one of the following statuses (Transaction statuses): AUTHORISED_TO_VALIDATE WAITING_AUTHORISATION_TO_VALIDATE WAITING_AUTHORISATION AUTHORISED This method will return an error: when called with an incorrect value of amount (null, 0, or greater than the original amount), when called with the same values for amount, day of capture and validation mode, as the original values. Arguments Mandatory Name Data type Description Field siteid String / n8 Shop ID transmissiondate datetime / ans..40 Date and time of creation of the transaction to be modified, according to the W3C guidelines. E.g. 2012-06-08T08:16:43+00:00 transactionid String / an6 Unique ID of the transaction to modify Sequence number of the transaction to be modified. sequencenumber Int / n..3 Values: 1 for a single payment. The number of term in the case of an installment payment ctxmode String Indicates if the request is made in test mode or live mode. (Expected value: TEST or PRODUCTION ) amount Long / n..12 Transaction amount. Positive integer, smallest possible unit per currency (for euro, we re calculating the amount in cents) If you do not wish to modify the amount of the transaction, you have to populate this field with the initial amount value. currency Int / n3 Currency code according to the ISO 4217 standard (e.g «978» for EURO) Defines the day of automatic capture of an datetime / presentationdate authorized payment, according to the W3C ans..40 guidelines (e.g. 2012-06-08T08:16:43+00:00 validate bool Indicates if you want to validate the transaction. 0 = NO, 1 = YES comment String Use this field to record comments about the payment. wssignature String Signature (see below) @Lyra Network- 31/ 79
Use the following fields in this order: siteid, transactionid, sequencenumber, ctxmode, amount, currency, validate, comment Returns Returns a transactioninfo object. @Lyra Network- 32/ 79
cancel() Use cancel() to cancel definitely a transaction not captured yet. Transactions must have one of the following statuses (Transaction statuses): AUTHORISED_TO_VALIDATE WAITING_AUTHORISATION_TO_VALIDATE WAITING_AUTHORISATION AUTHORISED Arguments Name Data Type Description Mandatory Field siteid String / n8 Shop ID transmissiondate datetime / ans..40 sequencenumber Int / n..3 Date and time of creation of the transaction to be cancelled, according to the W3C guidelines. E.g. 2012-06-08T08:16:43+00:00 transactionid String / an6 Unique ID of the transaction to cancel Sequence number of the transaction to be cancelled. Values: ctxmode String 1 for a single payment. The number of term in the case of an installment payment Indicates if the request is made in test mode or live mode (Expected value: TEST or PRODUCTION ) comment String Use this field to record comments about the payment. wssignature String Signature (see below) Use the following fields in this order: siteid, transactionid, sequencenumber, ctxmode, comment Returns Returns a standardresponse object. @Lyra Network- 33/ 79
refund() Use refund() to refund a transaction that has previously been captured. You can either refund the full amount of the debit or you can issue a partial refund. You can do so as many times as you wish until the entire transaction has been refunded. Once entirely refunded, a transaction can t be refunded again. Refund operation may be refused if the credit card expiry date is exceeded. This method will return an error: when called on a transaction that has been not yet captured when called on an already-refunded transaction when trying to refund more money than is left Transactions must have the following statuses (Transaction statuses): CAPTURED Arguments Name Data Type Description Mandatory Field siteid String / n8 Shop ID transmissiondate transactionid datetime / ans..40 String / an6 sequencenumber Int / n..3 ctxmode String newtransactionid String / an6 Date and time of creation of the transaction to be refunded, according to the W3C guidelines. E.g. 2012-06-08T08:16:43+00:00 Unique ID of the transaction to refund (Initial transaction) Sequence number of the transaction to be refunded. Values: 1 for a single payment. The number of term in the case of an installment payment Indicates if the request is made in test mode or live mode (Expected value: TEST or PRODUCTION ) Unique ID of the transaction generated by the merchant. amount Long / n..12 Amount of the refund. currency presentationdate validationmode comment Int / n3 datetime / ans..40 Int / n..1 String Currency code according to the ISO 4217 standard (e.g «978» for EURO) Defines the day of automatic capture of an authorized payment, according to the W3C guidelines (e.g. 2012-06-08T08:16:43+00:00 Payment validation mode 0= Automatic ; 1= Manual Use this field to record comments about the payment. wssignature String Signature (see below) @Lyra Network- 34/ 79
Use the following fields in this order: siteid, transactionid, sequencenumber, ctxmode, newtransactionid, amount, currency, validationmode, comment Returns Returns a transactioninfo object. @Lyra Network- 35/ 79
duplicate() Use duplicate() on an existing transaction to create a new transaction with the same characteristics. Transactions must have one of the following statuses (Transaction statuses): CAPTURED EXPIRED CANCELLED REFUSED Arguments Name Data Type Description Mandatory Field siteid String Shop ID transmissiondate transactionid datetime / ans..40 String / an6 sequencenumber Int / n..3 ctxmode String Date and time of creation of the transaction to be duplicated, according to the W3C guidelines. E.g. 2012-06-08T08:16:43+00:00 Unique ID of the transaction to be duplicated (Initial transaction) Sequence number of the transaction to be duplicated. Values: 1 for a single payment. The number of term in the case of an installment payment Indicates if the request is made in test mode or live mode (Expected value: TEST or PRODUCTION ) orderid String / ans..64 Order reference orderinfo String orderinfo2 String Order description orderinfo3 String amount Long / n..12 Transaction amount. Positive integer, smallest possible unit per currency (for euro, we re calculating the amount in cents) currency Int / n3 Currency code according to the ISO 4217 standard (e.g «978» for EURO) newtransactionid String / an6 Unique ID of the transaction, generated by the merchant. Defines the day of automatic capture of an datetime / presentationdate authorized payment, according to the W3C ans..40 guidelines (e.g. 2012-06-08T08:16:43+00:00 validationmode Int / n..1 Payment validation mode 0= Automatic ; 1= Manual comment String Use this field to record comments about the payment. wssignature String Signature (see below) @Lyra Network- 36/ 79
Use the following fields in this order: siteid, transactionid, sequencenumber, ctxmode, orderid, orderinfo, orderinfo2, orderinfo3, amount, currency, newtransactionid, validationmode, comment Returns Returns a transactioninfo object. @Lyra Network- 37/ 79
getinfo() Use getinfo() to retrieve the data of an existing transaction. Arguments Name Data Type Description Mandatory Field siteid String / n8 Shop ID transmissiondate datetime / ans..40 Date and time of creation of the transaction to be retrieved, according to the W3C guidelines. E.g. 2012-06-08T08:16:43+00:00 transactionid String / an6 Unique ID of the transaction to retrieve Sequence number of the transaction to be retrieved. sequencenumber Int / n..3 Values: 1 for a single payment. The number of term in the case of an installment payment ctxmode String Indicates if the request is made in test mode or live mode (Expected value: TEST or PRODUCTION ) wssignature String Signature (see below) Use the following fields in this order: siteid, transactionid, sequencenumber, ctxmode Returns Returns a transactioninfo object. @Lyra Network- 38/ 79
validate() Use validate() to allow the automatic capture of a transaction to be launched at the day specified in the payment creation request. Transactions must have one of the following statuses (Transaction statuses): AUTHORISED_TO_VALIDATE WAITING_AUTHORISATION_TO_VALIDATE Arguments Name Data Type Description Mandatory Field siteid String / n8 Shop ID transmissiondate datetime / ans..40 Date and time of creation of the transaction to be validated, according to the W3C guidelines. E.g. 2012-06-08T08:16:43+00:00 transactionid String / an6 Unique ID of the transaction to be validated Sequence number of the transaction to be validated. sequencenumber Int / n..3 Values: 1 for a single payment. The number of term in the case of an installment payment ctxmode String Indicates if the request is made in test mode or live mode (Expected value: TEST, PRODUCTION ) comment String Use this field to record comments about the payment. wssignature String Signature (see below) Use the following fields in this order: siteid, transactionid, sequencenumber, ctxmode, comment Returns Returns a standardresponse object. @Lyra Network- 39/ 79
force() Deprecated. @Lyra Network- 40/ 79
9. Objects createpaymentinfo Definition Represents a payment request. It is used for the createwiththreeds function calls. Properties Name Data Type Description Mandatory Field paymentgeneralinfo createpaymentgeneralinfo Characteristics of the transaction cardinfo createcardinfo Credit card information subpaymentinfo createsubpaymentinfo Reserved for future use customerinfo createcustomerinfo Details about the customer shippinginfo createshippinginfo Details about delivery extrainfo createextrainfo Extra information Use the following fields in this order: paymentgeneralinfo, cardinfo, subpaymentinfo, customerinfo, shippinginfo, extrainfo @Lyra Network- 41/ 79
createpaymentgeneralinfo Definiton Contains the transaction s characteristics. Properties Name Data Type Description Mandatory Field siteid String / n8 Shop ID. transmissiondate transactionid paymentsource datetime / ans..40 String / an6 string UTC date and time of the transaction according to the W3C guidelines (e.g. 2012-06-08T08:16:43+00:00). Represents the date and time of the request. If the value of this field is too far from the current UTC time, the request will be rejected. (errorcode 6) 6 digit number representing the transaction ID. Must be unique on a same day (from 00h00:00 UTC to 23h59:59UTC). Origin of the payment: - EC: E-commerce - MOTO : mail or phone order - CC : call center - OTHER : other channel of sale Note : EC must be used to make transactions with 3D-Secure authentication. orderid String / an..64 Order reference orderinfo String / an..255 orderinfo2 String / an..255 Order description orderinfo3 String / an..255 Transaction amount. Positive integer, smallest possible amount Long / n..12 unit per currency (for euro, we re calculating the amount in cents) currency Int / n3 Currency code according to the ISO 4217 standard (e.g «978» for EURO) Defines the day of automatic capture of an authorized payment, according to the W3C guidelines (e.g. 2012-06-08T08:16:43+00:00 presentationdate datetime / ans..40 When the date of capture is greater than the validity period of the authorization request, a pre-authorization request is performed for an amount of 1 euro in order to check the credit card validity. For example, in France, the validity period of the authorization request is: 7 days for VISA, MasterCard, CB, American Express cards 30 days for MAESTRO cards The authorization for the global amount will be processed between 7 and 0 days before the date of capture, depending on your shop setting (with or without anticipated authorization). @Lyra Network- 42/ 79
validationmode Int / n..1 If you want to be notified of this authorization request result, you have to activate the Instant Payment Notification rule named URL serveur sur autorisation par batch from the Systempay portal (Menu Setting/Notification rules) Payment validation mode 0= Automatic ; 1= Manual Use the following fields in this order: createpaymentgeneralinfo.siteid, createpaymentgeneralinfo.transactionid, createpaymentgeneralinfo.paymentsource, createpaymentgeneralinfo.orderid, createpaymentgeneralinfo.orderinfo, createpaymentgeneralinfo.orderinfo2, createpaymentgeneralinfo.orderinfo3, createpaymentgeneralinfo.amount, createpaymentgeneralinfo.currency, createpaymentgeneralinfo.validationmode @Lyra Network- 43/ 79
createcardinfo Contains all necessary data of the card presented for the purchase. Properties Name cardnumber cardnetwork expirymonth expiryyear cvv Data Type Description string string Int / n..2 Int / n4 string The card number, as string without any separators Card type used ("AMEX", "CB", "MASTERCARD", "VISA", "MAESTRO", "E-CARTEBLEUE", "JCB") 1-12 digit number representing the card's expiration month (e.g. 3 for March, 10 for October) Four digit number representing the card's expiration year (e.g. 2023) 3-4 digit representing the security code of the card. Some cards do not have a security code, so the security code is optional in createwithtreeds and create methods. This field is required when the card has a security code and when the customer entered it. This field is required for payment by ID. Mandatory Field cardident cardbirthday contractnumber string datetime / ans..40 string paymentoptioncode string Identifier of the customer account (payment created by ID) In case of a payment created by ID, this field is mandatory and must contain an existing ID (errorcode 17) In other cases this field mustn t be sent (errorcode 22) Date of birth of the customer. Merchant ID If this field is filled, make sure to use the right contract depending on the card's network. For example, the VISA contract can t be used for an AMEX transaction. Reserved for future use Use the following fields in this order: createcardinfo.cardnumber, createcardinfo.cardnetwork, createcardinfo.expirymonth, createcardinfo.expiryyear, createcardinfo.cvv, createcardinfo.cardbirthday, createcardinfo.cardident, createcardinfo.contractnumber, createcardinfo.paymentoptioncode @Lyra Network- 44/ 79
createsubpaymentinfo Reserved for future use. subpaymentinfo mustn t be populated in the request. Its value in the signature computation must be empty. Properties Name subpaymenttype subreference subpaymentnumber Data Type Description int string Do not populate. int Mandatory Field Use the following fields in this order: createsubpaymentinfo.subpaymenttype, createsubpaymentinfo.subreference, createsubpaymentinfo.subpaymentnumber @Lyra Network- 45/ 79
createcustomerinfo Definition Contains the customer s information. Properties Name Data Type Description customerid String / an..80 Customer ID (i.e. his reference in the merchant site) customertitle String / ans..80 Title customerstatus custstatus Type of customer customername String / ans..128 Customer name customerphone String / ans..32 Customer phone number customeremail String / ans..150 Customer e-mail address customeraddressnumber String / an..5 Billing address number customeraddress String / ans..255 Billing address street customerdistrict String / ans..127 Billing address district customerzip String / an..64 Billing address Postal code/zip code customercity String / ans..128 Billing address city customerstate String / ans..128 Billing address state customercountry String / ans..40 Billing address country language String / a2 Customer language (ISO 639-1 standard - 2 letters). customerip string IP address of the customer s browser customersendemail Boolean Send payment confirmation by e-mail to the customer. 0= No ; 1=Yes. customercellphone String / ans..32 Customer mobil phone number extinfo extinfo[] An array of extinfo(key;value) Mandatory Field Use the following fields in this order: createcustomerinfo.customerid, createcustomerinfo.customertitle, createcustomerinfo.customerstatus, createcustomerinfo.customername, createcustomerinfo.customerphone, createcustomerinfo.customeremail, createcustomerinfo.customeraddressnumber, createcustomerinfo.customeraddress, createcustomerinfo.customerdistrict createcustomerinfo.customerzip, createcustomerinfo.customercity, createcustomerinfo.customercountry, createcustomerinfo.language, createcustomerinfo.customerip, createcustomerinfo.customersendemail, createcustomerinfo.customercellphone, createcustomerinfo.extinfo Note: customerstate mustn t be included the signature computation. @Lyra Network- 46/ 79
createshippinginfo Definition Contains the customer s shipping address details. Properties Name Data Type Description shippingstatus custstatus Type of customer shippingname String / The customer s shipping name ans..128 shippingphone String / ans..32 The customer s shipping phone number shippingstreetnumber String / an..5 The customer s shipping address number shippingstreet String / ans..128 The customer s shipping address shippingstreet2 The customer s shipping address, String / ans..128 line 2 shippingdistrict String / ans..127 The customer s shipping disctrict shippingzipcode String / ans..64 The customer s shipping zip shippingcity String / ans..128 The customer s shipping city shippingstate String / ans..128 The customer s shipping state shippingcountry String / ans..128 The customer s shipping country shippingdeliverycompanyname String / ans..128 Name of the delivery company shippingspeed deliveryspeed Shipping method s speed shippingtype deliverytype Shipping method Mandatory Field Use the following fields in this order: createshippinginfo.shippingcity, createshippinginfo.shippingcountry, createshippinginfo.shippingdeliverycompanyname, createshippinginfo.shippingname, createshippinginfo.shippingphone, createshippinginfo.shippingspeed, createshippinginfo.shippingstate, createshippinginfo.shippingstatus, createshippinginfo.shippingstreetnumber, createshippinginfo.shippingstreet, createshippinginfo.shippingstreet2, createshippinginfo.shippingdistrict, createshippinginfo.shippingtype, createshippinginfo.shippingzipcode @Lyra Network- 47/ 79
createextrainfo Definition Contains extra info such as the mode, the browser s user Agent of the customer Properties Name ctxmode Data Type Description string browseruseragent string browseraccept string Indicates if the request is made in test mode or live mode (Expected value: TEST or PRODUCTION ) The User-Agent request-header field, following standard HTTP/1.1 (RFC. 2616) The HTTP Accept request-header field, following standard HTTP/1.1 (RFC. 2616) Mandatory Field Use the following fields in this order: createextrainfo.ctxmode, createextrainfo.browseruseragent, createextrainfo.browseraccept @Lyra Network- 48/ 79
paymentcreationinfo Definition Represents a payment request. It is used for the create function call. Properties Name Data Type Description Mandatory Field paymentgeneralinfo createpaymentgeneralinfo Characteristics of the transaction cardinfo createcardinfo Credit card information threedsresult threedsresult Result of the 3D-S process subpaymentinfo createsubpaymentinfo Reserved for future use customerinfo createcustomerinfo Details about the customer shippinginfo createshippinginfo Details about delivery extrainfo createextrainfo Extra information Use the following fields in this order: paymentgeneralinfo, cardinfo, threedsresult, subpaymentinfo, customerinfo, shippinginfo, extrainfo @Lyra Network- 49/ 79
threedsresult Definition Contains the result of the payer authentication performed by the merchant. Properties Name Data Type Description Mandatory Field threedsbrand string Card brand ("VISA" or "MASTERCARD") threedsenrolled string Verify Enrollment Response : "Y" : Authentication available, cardholder is enrolled "N" : Cardholder not participating, cardholder is not enrolled "U" : Unable to authenticate or card not eligible for attempts (e.g. commercial or prepaid card) threedsstatus string Transaction Status relating to payment authentication results: "Y" : Successful cardholder authentication "N" : Failed cardholder authentication "U" : ACS unable to perform payment authentication "A" : Proof of Attempt occurred and authentication could not be performed threedseci string Electronic Commerce Indicator threedsxid string Unique transaction reference threedscavv string Cardholder Authentication Verification Value Algorithm used by the ACS to generate the cavv value : threedscavvalgorithm string "0" : HMAC "1" : CVV "2" : CVV_ATN "3" : Mastercard SPA Use the following fields in this order: threedsresult.threedsbrand, threedsresult.threedsenrolled, threedsresult.threedsstatus, threedsresult.threedseci, threedsresult.threedsxid, threedsresult.threedscavv, threedsresult.threedscavvalgorithm Note: When creating a transaction using the create() method, threedsresult object is optional. When the merchant performs 3D-Secure process, this object becomes mandatory (even if the authentication is successful or failed). @Lyra Network- 50/ 79
Case of cards not enrolled (threedsenrolled = "N"): The merchant must provide these fields: threedsbrand, threedsenrolled. The other fields (threedsstatus, threedseci, threedsxid, threedscavv, and threedscavvalgorithm) must not be sent. Case of cards enrolled (threedsenrolled = "Y"): The merchant must provide this fields: threedsbrand, threedsenrolled, threedsstatus, threedsxid. In case of successful authentication (threedsstatus = "Y" or "A") : threedseci, threedscavv and threedscavvalgorithm become mandatory. In case of failed authentication (threedsstatus = "N" or "U") : threedseci, threedscavv and threedscavvalgorithm mustn t be sent. Case of unknown enrollment status (threedsenrolled = "U"): The merchant must provide these fields: threedsbrand, threedsenrolled. ThreeDSStatus, threedseci, threedsxid, threedscavv, and threedscavvalgorithm) mustn t be sent. @Lyra Network- 51/ 79
custstatus Values used to define a customer. Name PRIVATE COMPANY Description Private customer Company deliveryspeed Values used to define the shipping method s speed. Name STANDARD EXPRESS Description Standard shipping Express shipping deliverytype Values used to define the shipping method. Name Description RECLAIM_IN_SHOP Pick-up the order in store RELAY_POINT Use of a pick-up point network (i.e Kiala, Alveol, etc.) RECLAIM_IN_STATION Pick-up in a station (airport, train station, travel agency) PACKAGE_DELIVERY_COMPANY Delivery company (La poste, Colissimo, UPS, DHL ) ETICKET E-ticket or downloadable product extinfo Definition Use this extra field to persist informations in the transaction details (e.g : items of the shopping cart etc.). Properties Field Data type Description key string Data name value string Data value Use the following fields in this order: extinfo.key, extinfo.value @Lyra Network- 52/ 79
createwiththreedsresponse Definition The createwiththreedsresponse message response is sent in response to a createwiththreeds function call. Properties Name Data Type Description errorcode int Error Handling extendederrorcode string Extra information about error code when errorcode is different from 0 timestamp long Timestamp signature string Response signature (see below) This field is returned only if the card is enrolled: threedsenrolled = «Y» (in this case the transactioninfo verespareqinfo verespareqinfo field is not sent). It contains the encoded PaReq message. See verespareqinfo definition 0 transactioninfo transactioninfo Description of the transaction. See 0 If threedsenrolled = «Y», this field is not returned. Use the following fields in this order: errorcode, extendederrorcode, timestamp, verespareqinfo, transactioninfo The errorcode value present in the response will match with: the verespareqinfo table (see Error codes), when the verespareqinfo field is returned, the transactioninfo table (see Error codes), when the transactioninfo field is returned. @Lyra Network- 53/ 79
verespareqinfo The verespareqinfo object contains all necessary data to perform the payer authentication request. Properties Name Type Description errorcode int Error Handling errordetail string Extra information about the error when errorcode is different from 0 signature string Signature for the verespareqinfo object (see below) timestamp long Timestamp threedsacctid String Account Identifier provided by the Directory Server and useful for the ACS threedsacsurl String the Access Control Server (ACS) URL threedsbrand String Card brand threedsencodedpareq String Payer authentication message (PAReq) threedsenrolled String Payer enrollment status : «Y»: Enrolled threedsrequestid String 3DS request ID used in the finalizewiththreeds() method Use the following fields in this order: errorcode, errordetail, timestamp, threedsacctid, threedsacsurl, threedsbrand, threedsencodedpareq, threedsenrolled threedsrequestid @Lyra Network- 54/ 79
transactioninfo Definition The transactioninfo object defines all the characteristics of a transaction. Properties Name Data Type Description errorcode int Error Handling extendederrorcode string Extra information about the error when errorcode is different from 0 transactionstatus int Transaction status. Deprecated timestamp long Timestamp signature string Signature for the transactioninfo object transactionstatuslabel String paymentgeneralinfo transactionpaymentgeneralinfo Characteristics of the transaction cardinfo transactioncardinfo Credit card information threedsinfo transactionthreedsinfo Result of the 3D-S process authorizationinfo transactionauthorizationinfo Details about authorization request markinfo transactionmarkinfo Details about pre-authorization request warrantydetailsinfo transactionwarrantydetailsinfo Information about Liability Shift and risk management controls. captureinfo transactioncaptureinfo Information about the capture customerinfo transactioncustomerinfo Details about the customer shippinginfo transactionshippinginfo Details about delivery extrainfo transactionextrainfo Extra information paymentoptioninfo transactionpaymentoptioninfo Reserved for future use boletoinfo transactionboletoextrainfo Reserved for future use Use the following fields in this order: transactioninfo.errorcode, transactioninfo.extendederrorcode, transactioninfo.transactionstatus, transactioninfo.timestamp, transactioninfo.paymentgeneralinfo, transactioninfo.cardinfo, transactioninfo.threedsinfo, transactioninfo.authorizationinfo, transactioninfo.markinfo, transactioninfo.warrantydetailsinfo, transactioninfo.captureinfo, transactioninfo.customerinfo, transactioninfo.shippinginfo, transactioninfo.extrainfo, transactioninfo.transactionstatuslabel @Lyra Network- 55/ 79
transactionpaymentgeneralinfo Definition The transactionpaymentgeneralinfo object contains information about a transaction. Properties Name Data Type Description siteid string Shop ID paymentsource string Origin of the payment : - "E_COMMERCE" : e-commerce - "MAIL_OR_TELEPHONE" : Mail or phone order - "CALL_CENTER" : call center - "OTHER" : other channel of sale orderid string Order reference. Returned unchanged from the request orderinfo string Order description. Returned unchanged from the request orderinfo2 string Order description. Returned unchanged from the request orderinfo3 string Order description. Returned unchanged from the request transmissiondate datetime UTC date and time of the transaction according to the W3C guidelines (e.g. 2012-06-08T08:16:43+00:00). transactionid string Transaction ID sequencenumber int Sequence number of the transaction amount string Actual transaction amount, in the smallest possible unit per currency initialamount string Initial transaction amount (before any modification, in the smallest possible unit per currency currency int ISO 4217 formatted currency code (e.g «978» for EURO) effectiveamount string Exchange value of the amount, in the smallest possible unit per currency effectivecurrency int Exchange value of the currency (ISO 4217 formatted currency code) presentationdate datetime Bank settlement date when the funds will be settled into the merchant s account type int Operation type : 0 = DEBIT, 1 = CREDIT multiplepayment int Installment payment : 0=No, 1= Yes effectivecreationdate datetime UTC date and time of the record of the transaction Use the following fields in this order: transactionpaymentgeneralinfo.siteid, transactionpaymentgeneralinfo.paymentsource, transactionpaymentgeneralinfo.orderid, transactionpaymentgeneralinfo.orderinfo, transactionpaymentgeneralinfo.orderinfo2, transactionpaymentgeneralinfo.orderinfo3, transactionpaymentgeneralinfo.transactionid, transactionpaymentgeneralinfo.sequencenumber, transactionpaymentgeneralinfo.amount, transactionpaymentgeneralinfo.initialamount, transactionpaymentgeneralinfo.currency, transactionpaymentgeneralinfo.effectiveamount, transactionpaymentgeneralinfo.effectivecurrency, transactionpaymentgeneralinfo.type, transactionpaymentgeneralinfo.multiplepayment, @Lyra Network- 56/ 79
transactioncardinfo Definition The transactioncardinfo object defines the card details. Properties: Name Data Type Description cardnumber string Truncated credit card number. Contains first 6 digits of the card number, followed by XXXXXX and then the last 4 digits of the card number. cardnetwork string Card network cardbrand string Card brand cardcountry long ISO 3166-1 Country code of the card. cardproductcode string Bank product of the card cardbankcode string Bank code of the issuer expirymonth int 1-12 digit number representing the card's expiration month (e.g. 3 for March, 10 for October) expiryyear int Four digit number representing the card's expiration year (e.g. 2023) contractnumber string Merchant ID Use the following fields in this order: transactioncardinfo.cardnumber, transactioncardinfo.cardnetwork, transactioncardinfo.cardbrand, transactioncardinfo.cardcountry, transactioncardinfo.expirymonth, transactioncardinfo.expiryyear, transactioncardinfo.contractnumber, transactioncardinfo.cardbankcode, transactioncardinfo.cardproductcode @Lyra Network- 57/ 79
transactionthreedsinfo Definition The transactionthreedsinfo object contains information about the 3D-Secure process such as cardholder authentication result. Properties Name Data Type Description threedsenrolled string Verify Enrollment Response : "Y" : Authentication available, cardholder is enrolled "N" : Cardholder not participating, cardholder is not enrolled "U" : Unable to authenticate or card not eligible for attempts (e.g. commercial or prepaid card) threedsstatus string Transaction Status relating to payment authentication results: "Y" : Successful cardholder authentication "N" : Failed cardholder authentication "U" : ACS unable to perform payment authentication "A" : Proof of Attempt occurred and authentication could not be performed threedseci string Electronic Commerce Indicator threedsxid string Unique transaction reference threedscavvalgorithm string Algorithm used by the ACS to generate the cavv value : "0" : HMAC "1" : CVV "2" : CVV_ATN "3" : Mastercard SPA threedscavv string Cardholder Authentication Verification Value threedssignvalid string Signature used to check the pares integrity threedsbrand string Card brand ("VISA" or "MASTERCARD") "COND_3D_SUCCESS", "COND_3D_FAILURE", threedstransactioncondition string "COND_3D_ERROR", "COND_3D_NOTENROLLED", "COND_3D_ATTEMPT", "COND_SSL" See details below. @Lyra Network- 58/ 79
Values for threedstransactioncondition: Value "COND_3D_SUCCESS" " COND_3D_FAILURE" " COND_3D_ERROR" " COND_3D_NOTENROLLED" " COND_3D_ATTEMPT" "COND_SSL" Description Successful cardholder authentication. The cardholder is enrolled and has been authenticated by the issuer. Failed cardholder authentication. The cardholder is enrolled and fails to correctly enter the authentication information (or cancels authentication page). Authentication could not be performed. Unable to complete the authentication request. An error occurred during the enrollment verification or during the cardholder authentication. Cardholder Not Participating Cardholder is NOT registered for 3D Secure. Attempt processing performed. The cardholder is enrolled but authentication was not available. A proof the merchant attempted 3D Secure authentication has been generated by the issuer. 3D Secure Not Applicable Merchant account is not participating or 3D Secure authentication is not applicable for this form of payment. Use the following fields in this order: transactionthreedsinfo.threedstransactioncondition, transactionthreedsinfo.threedsenrolled, transactionthreedsinfo.threedsstatus, transactionthreedsinfo.threedseci, transactionthreedsinfo.threedsxid, transactionthreedsinfo.threedscavvalgorithm, transactionthreedsinfo.threedscavv, transactionthreedsinfo.threedssignvalid, transactionthreedsinfo.threedsbrand @Lyra Network- 59/ 79
transactionauthorizationinfo Definition The transactionauthorizationinfo object defines the details of an authorization request. Properties Name Data Type Description "MARK": A pre-authorization request was performed for an amount of 1 euro in order to check the credit card validity. authmode string This value is returned when the date of capture is greater than the validity period of the authorization request. For example, in France, the validity period of the authorization request is: 7 days for VISA, MasterCard, CB, American Express cards 30 days for MAESTRO cards "FULL": authorization request performed with the global amount. authamount authcurrency authdate authnumber authresult string string string string int Authorized amount in the smallest unit per currency. Returned when the value of the authmode field is FULL. ISO 4217 currency code of the currency used in the authorization request. Returned when the value of the authmode field is FULL. The date when the authorization request was performed. Returned when the value of the authmode field is FULL. The authorization request ID. Returned when the value of the authmode field is FULL. The bank response code to the authorization request Returned when the value of the authmode field is FULL. authcvv2_cvc2 string Information about verification process of the security code. Use the following fields in this order: transactionauthorizationinfo.authmode, transactionauthorizationinfo.authamount, transactionauthorizationinfo.authcurrency, transactionauthorizationinfo.authnumber, transactionauthorizationinfo.authresult, transactionauthorizationinfo.authcvv2_cvc2 @Lyra Network- 60/ 79
transactionmarkinfo Definition The transactionmarkinfo object defines the details of a pre-authorization request. Properties Name markamount markcurrency markdate marknb markresult Data Type Description Authorized amount in the smallest unit per currency. long E.g:100 for 1 euro ISO 4217 currency code of the currency used in the int authorization request. Returned when the value of the authmode field is MARK. datetime string int The date when the authorization request was performed. Returned when the value of the authmode field is MARK. The authorization request ID. Returned when the value of the authmode field is MARK. The bank response code to the authorization request. Returned when the value of the authmode field is MARK. markcvv2_cvc2 string Information about verification process of the security code. Use the following fields in this order: transactionmarkinfo.markamount, transactionmarkinfo.markcurrency, transactionmarkinfo.marknb, transactionmarkinfo.markresult, transactionmarkinfo.markcvv2_cvc2 @Lyra Network- 61/ 79
transactionwarrantydetailsinfo Definition The transactionwarrantydetailsinfo object defines the details about warranty/ liability shift and contains the results of risk management controls. Properties Name Data Type Description paymenterror int Extra information in case of technical error (see paymenterror). warrantlyresult string Payment warranty / Liability shift (YES / NO) localcontrol Array localcontrol Result of risk management controls. litige boolean Dispute Use the following fields in this order: transactionwarrantydetailsinfo.paymenterror, transactionwarrantydetailsinfo.warrantlyresult, transactionwarrantydetailsinfo.localcontrol, transactionwarrantydetailsinfo.litige @Lyra Network- 62/ 79
localcontrol Definition The localcontrol object defines a risk management control. Properties Name Data Type Description name string Name of the risk management rule result Boolean Result Values for name : Value "CARD" "COUNTRY" "IPADDR" "AMOUNT" "BIN" Description The card number is recorded in the merchant grey list. The country of the customer is recorded in the merchant grey list. The customer s IP address is recorded in the merchant grey list. The maximum amount of purchase with this card number has been reached The credit card s BIN is recorded in the merchant grey list " ECB" e-carte bleue detected "CARD_COMMERCIAL_NATIONAL" National commercial card detected "CARD_COMMERCIAL_FOREIGN" Foreign commercial card detected "CAS" Debit card detection "COUNTRY_CONSISTENCY" The country of origin of the card, the country of the IP address used and the country of the customer do not match. "NON_GUARANTEED_PAYMENT" Transaction without warranty / liability shift. "IPADDR_COUNTRY" The country of the IP address used is recorded in the merchant grey list This list may lengthen, please take it into account in your implementation. Values for result : Value Description "0" The check is false "1" The check is true Use the following fields in this order: localcontrol.name, localcontrol.result @Lyra Network- 63/ 79
transactioncaptureinfo Definition The transactioncaptureinfo object defines the details of the capture, only for captured payment. Properties Name Data Type Description capturedate datetime Capture date capturenumber int Capture ID rapprochementstatut int Payment reconciliation status. refundamount long Total of amount refunded in the smallest possible unit per currency refundcurrency int ISO 4217 currency code of the refunded amount. (Code monnaie ISO 4217, Euro : 978) Use the following fields in this order: transactioncaptureinfo.capturenumber, transactioncaptureinfo.rapprochementstatut, transactioncaptureinfo.refundamount, transactioncaptureinfo.refundcurrency @Lyra Network- 64/ 79
transactioncustomerinfo Definition The transactioncustomerinfo décrit les détails concernant le porteur de la carte : Properties Name Data Type Description customerid string Customer ID (i.e. his reference in the merchant site) customertitle string Title customerstatus custstatus Type of customer customername string Customer name customerphone string Customer phone number customeremail string Customer e-mail address customeraddressnumber string Billing address number customeraddress string Billing address street customerdistrict string Billing address district customerzip string Billing address Postal code/zip code customercity string Billing address city customercountry string Billing address country language string Customer language (ISO 639-1 standard - 2 letters). customerip string Customer IP Address customercellphone string Customer mobile phone number extinfo extinfo[] Array of extinfo Use the following fields in this order: transactioncustomerinfo.customerid, transactioncustomerinfo.customertitle, transactioncustomerinfo.customerstatus, transactioncustomerinfo.customername, transactioncustomerinfo.customerphone, transactioncustomerinfo.customeremail, transactioncustomerinfo.customeraddressnumber, transactioncustomerinfo.customeraddress, transactioncustomerinfo.customerdistrict, transactioncustomerinfo.customerzip, transactioncustomerinfo.customercity, transactioncustomerinfo.customercountry, transactioncustomerinfo.language, transactioncustomerinfo.customerip, transactioncustomerinfo.customercellphone, transactioncustomerinfo.extinfo @Lyra Network- 65/ 79
transactionshippinginfo Definition The transactionshippinginfo object contains information about the delivery: Properties Name Data Type Description shippingcity string The customer s delivery city shippingcountry string The customer s delivery country shippingdeliverycompanyname string Name of the delivery company shippingname string The customer s delivery name shippingphone string The customer s delivery phone number shippingspeed deliveryspeed Delivery method s speed shippingstate string The customer s delivery state shippingstatus custstatus Type of customer shippingstreetnumber string The customer s delivery address number shippingstreet string The customer s delivery address shippingstreet2 string The customer s delivery address, line 2 shippingdistrict string The customer s delivery district shippingtype deliverytype Delivery method shippingzipcode string The customer s delivery zip Use the following fields in this order: transactionshippinginfo.shippingcity, transactionshippinginfo.shippingcountry, transactionshippinginfo.shippingdeliverycompanyname, transactionshippinginfo.shippingname, transactionshippinginfo.shippingphone, transactionshippinginfo.shippingspeed, transactionshippinginfo.shippingstate, transactionshippinginfo.shippingstatus, transactionshippinginfo.shippingstreetnumber, transactionshippinginfo.shippingstreet, transactionshippinginfo.shippingstreet2, transactionshippinginfo.shippingdistrict, transactionshippinginfo.shippingtype, transactionshippinginfo.shippingzipcode @Lyra Network- 66/ 79
transactionextrainfo Definition The transactionextrainfo object contains information about the mode (test or live): Properties Name ctxmode Data Type Description Indicates if the request is made in test mode or live mode string ("TEST", "PRODUCTION") Use the following fields in this order: transactionextrainfo.ctxmode @Lyra Network- 67/ 79
standardresponse Definition The standardresponse object is returned by the following methods: cancel and validate. Properties Name Data Type Description errorcode int Error Handling extendederrorcode String Additional information on the error code transactionstatus int timestamp long Timestamp allowing to compute the unique signature signature String Response signature (see below) Use the following fields in this order: errorcode, extendederrorcode, transactionstatus, timestamp @Lyra Network- 68/ 79
10. Appendices Test credit card numbers These cards will be accepted in our system only for TEST mode. Ensure that the merchant account has been enrolled for 3D Secure by acquiring bank. Otherwise, the payment will be performed without 3D-Secure authentication. Result Successful transaction, successful cardholder authentication. Payment request with interactive 3D Secure authentication. Successful transaction, merchant account is not 3D Secure enabled. Successful transaction, cardholder is not registered for 3D Secure. Transaction declined. The transaction can be forced. Number VISA MASTERCARD MAESTRO 4970100000000000 5970100300000000 5000550000000000 4970100000000009 5970100300000009 5000550000000009 4970100000000003 5970100300000003 5000550000000003 4970100000000001 5970100300000001 5000550000000001 4970100000000002 5970100300000002 5000550000000002 Successful transaction, with no liability shift. 4970100000000007 5970100300023006 5000550000023006 Transaction declined, failed cardholder authentication. Transaction declined, insufficient funds available in customer account. Transaction declined, card security code mismatch. 4970100000000097 5970100300000097 5000550000000097 4970100000000098 5970100300000098 5000550000000098 4970100000000099 5970100300000099 5000550000000099 Expiration date and card security code are free. @Lyra Network- 69/ 79
Transaction statuses Values for transactionstatuslabel: transactionstatuslabel "INITIAL" "0" "AUTHORISED_TO_VALIDATE" "1" "WAITING_AUTHORISATION_TO_VALIDATE" "3" "AUTHORISED" "4" "WAITING_AUTHORISATION" "5" "CAPTURED" "6" "EXPIRED" "7" " REFUSED " "8" "CANCELLED" "9" "CAPTURE_FAILED" "13" transactionstatus (deprecated) Description In progress Reserved for special use. To be validated The transaction was successfully authorized with manual validation. The merchant must allow manually the transaction to be captured. To be validated and authorized: The requested day of capture is greater than the validity period of the authorization request. A pre-authorization request has been sent and accepted by the issuer bank. The merchant must allow manually the transaction to be authorized and captured. Waiting for capture : The transaction was successfully authorized and will be automatically captured. Waiting for authorization The requested day of capture is greater than the validity period of the authorization request. A pre-authorization request has been sent and accepted by the issuer bank. The authorization request will be automatically triggered before the day of capture. Captured The payment was successfully captured. Expired The day of capture has been reached but the merchant did not allow the transaction to be captured. Declined The payment has been refused. Cancelled The payment has been cancelled by the merchant Failure The capture process has failed. @Lyra Network- 70/ 79
Bank response code (used for authresult and markresult). Response code Response message 00 Approved 02 Refer to card issuer, special condition 03 Invalid Merchant 04 Pick up card 05 Do not Honour 07 Pick-Up card, Special condition 08 Honour with Identification 12 Invalid transaction 13 Invalid amount 14 Invalid card number 15 No such issuer 17 Operator cancelled 19 Re enter transaction 20 Invalid response 24 File update not supported 25 Unable to locate record 26 Duplicate record 27 File update edit error 28 File update file locked 29 File update not successful 30 Format error 31 Bank not supported 33 Expired card, pick-up 34 Suspected fraud, pick-up 38 Pin tries exceeded, pick-up 41 Lost card 43 Stolen card 51 Not sufficient funds (client to contact bank) 54 Expired card 55 Incorrect pin 56 No card record 57 Transaction not permitted to cardholder 58 Transaction not permitted on terminal 59 Suspected fraud 60 Contact Acquirer 61 Exceeds withdrawal limit 63 Security violation 68 Response received too late 75 PIN Tries exceeded 76 Cardholder already in opposition 90 Cut-off in progress 91 Issuer or switch inoperative 94 Duplicate transaction 96 Communication system malfunction 97 Communication error Cannot connect to FNB 98 Server unavailable, route request sent again 99 Technical error @Lyra Network- 71/ 79
.Net All optional, value-type properties of an object (such as the Int and bool types) have an additional Boolean property defined with Specified appended to the name. This property is used to tell the XML Serializer whether the corresponding property should be included when generating the XML that will be sent. When deserializing, this property indicates whether the corresponding property was included in the XML. For example, the createpaymentgeneralinfo object has an optional property called validationmode. When the proxy class is generated, a "validationmodespecified" property will also be created. When sending an object, if you specified a value for "validationmode", you must also set "validationmodespecified=true". If you do not, the value of "validationmode" will not be serialized and sent to the server. List of optional property Optional property Associated Boolean property createpaymentgeneralinfo.validationmode createpaymentgeneralinfo.validationmodespecified createpaymentgeneralinfo.presentationdate createpaymentgeneralinfo.presentationdatespecified createsubpaymentinfo.subpaymenttype createsubpaymentinfo.subpaymenttypespecified createsubpaymentinfo.subpaymentnumber createsubpaymentinfo.subpaymentnumberspecified createcustomerinfo.customersendemail createcustomerinfo.customersendemailspecified createcardinfo.expiryyear createcardinfo.expiryyearspecified @Lyra Network- 72/ 79
PHP Sample code : signature computation (create method) $hashsign=''; $hashsign= /* paymentcreationinfo.paymentgeneralinfo */ getsignaturevalue($createinfo->paymentgeneralinfo->siteid). getsignaturevalue($createinfo->paymentgeneralinfo->transactionid). getsignaturevalue($createinfo->paymentgeneralinfo->paymentsource). getsignaturevalue($createinfo->paymentgeneralinfo->orderid). getsignaturevalue($createinfo->paymentgeneralinfo->orderinfo). getsignaturevalue($createinfo->paymentgeneralinfo->orderinfo2). getsignaturevalue($createinfo->paymentgeneralinfo->orderinfo3). getsignaturevalue($createinfo->paymentgeneralinfo->amount). getsignaturevalue($createinfo->paymentgeneralinfo->currency). getsignaturevalue($createinfo->paymentgeneralinfo->validationmode). /* paymentcreationinfo.cardinfo */ getsignaturevalue($createinfo->cardinfo->cardnumber). getsignaturevalue($createinfo->cardinfo->cardnetwork). getsignaturevalue($createinfo->cardinfo->expirymonth). getsignaturevalue($createinfo->cardinfo->expiryyear). getsignaturevalue($createinfo->cardinfo->cvv). getsignaturevalue($createinfo->cardinfo->cardident). getsignaturevalue($createinfo->cardinfo->cardbirthday). getsignaturevalue($createinfo->cardinfo->contractnumber). getsignaturevalue($createinfo->cardinfo->paymentoptioncode); /* paymentcreationinfo.threedsresult */ if (!is_null($createinfo->threedsresult)){ $hashsign.= getsignaturevalue($createinfo->threedsresult->threedsbrand). getsignaturevalue($createinfo->threedsresult->threedsenrolled). getsignaturevalue($createinfo->threedsresult->threedsstatus). getsignaturevalue($createinfo->threedsresult->threedseci). getsignaturevalue($createinfo->threedsresult->threedsxid). getsignaturevalue($createinfo->threedsresult->threedscavv). getsignaturevalue($createinfo->threedsresult->threedscavvalgorithm); } else{ $hashsign.= "+"; } /* paymentcreationinfo.subpaymentinfo */ if (!is_null($createinfo->subpaymentinfo)){ $hashsign.= getsignaturevalue($createinfo->subpaymentinfo->subpaymenttype). getsignaturevalue($createinfo->subpaymentinfo->subreference). getsignaturevalue($createinfo->subpaymentinfo->subpaymentnumber); } else{ $hashsign.= "+"; } /* paymentcreationinfo.customerinfo */ if (!is_null($createinfo->customerinfo)){ $hashsign.= getsignaturevalue($createinfo->customerinfo->customerid). getsignaturevalue($createinfo->customerinfo->customertitle). getsignaturevalue($createinfo->customerinfo->customerstatus). getsignaturevalue($createinfo->customerinfo->customername). getsignaturevalue($createinfo->customerinfo->customerphone). getsignaturevalue($createinfo->customerinfo->customeremail). getsignaturevalue($createinfo->customerinfo->customeraddressnumber). getsignaturevalue($createinfo->customerinfo->customeraddress). getsignaturevalue($createinfo->customerinfo->customerdistrict). getsignaturevalue($createinfo->customerinfo->customerzip). @Lyra Network- 73/ 79
getsignaturevalue($createinfo->customerinfo->customercity). getsignaturevalue($createinfo->customerinfo->customercountry). getsignaturevalue($createinfo->customerinfo->language). getsignaturevalue($createinfo->customerinfo->customerip). getsignaturevalue($createinfo->customerinfo->customersendemail). getsignaturevalue($createinfo->customerinfo->customercellphone). getsignaturevalue($createinfo->customerinfo->extinfo); } else{ $hashsign.= "+"; } /* paymentcreationinfo.shippinginfo */ if (!is_null($createinfo->shippinginfo)){ $hashsign.= getsignaturevalue($createinfo->shippinginfo->shippingcity). getsignaturevalue($createinfo->shippinginfo->shippingcountry). getsignaturevalue($createinfo->shippinginfo->shippingdeliverycompanyname). getsignaturevalue($createinfo->shippinginfo->shippingname). getsignaturevalue($createinfo->shippinginfo->shippingphone). getsignaturevalue($createinfo->shippinginfo->shippingspeed). getsignaturevalue($createinfo->shippinginfo->shippingstate). getsignaturevalue($createinfo->shippinginfo->shippingstatus). getsignaturevalue($createinfo->shippinginfo->shippingstreetnumber). getsignaturevalue($createinfo->shippinginfo->shippingstreet). getsignaturevalue($createinfo->shippinginfo->shippingstreet2). getsignaturevalue($createinfo->shippinginfo->shippingdistrict). getsignaturevalue($createinfo->shippinginfo->shippingtype). getsignaturevalue($createinfo->shippinginfo->shippingzipcode); } else{ $hashsign.= "+"; } /* paymentcreationinfo.extrainfo */ $hashsign.= getsignaturevalue($createinfo->extrainfo->ctxmode). getsignaturevalue($createinfo->extrainfo->browseruseragent). getsignaturevalue($createinfo->extrainfo->browseraccept); /* certificate added */ $hashsign.= $key; @Lyra Network- 74/ 79
getsignaturevalue() description: function getsignaturevalue($value){ $signaturevalue=''; if (is_null($value)){ $signaturevalue.= $value. '+'; } /** * boolean */ if (is_bool($value)){ $signaturevalue = ($value? '1':'0').'+'; } /** * extinfo */ elseif(get_class($value)=='extinfo'){ $signaturevalue.= $value->key.'+'.$value->value.'+'; } } /** * array */ elseif(is_array($value)){ foreach($value as $name=>$val) { if(is_object($val)) { $signaturevalue.= getsignaturevalue($val); } } } else { $signaturevalue.= $value. '+'; } return $signaturevalue; @Lyra Network- 75/ 79