Professional Documents
Culture Documents
Version 1
www.worldpay.com
Table Of Contents
Table Of Contents
AboutThisGuide ..................................................................................................................................1 Copyright............................................................................................................................................1 Introduction............................................................................................................................................2 WhatisXMLDirect? .........................................................................................................................2 BeforeYouStart .....................................................................................................................................4 Introduction........................................................................................................................................4 ErrorMessages,InvalidXML ..........................................................................................................6 StructureofanXMLDirectOrder.......................................................................................................8 Introduction........................................................................................................................................8 XMLandDocumentTypeDeclaration...........................................................................................8 MerchantandServicespecificInformation ...................................................................................8 OrderDescriptionandAmount ......................................................................................................9 OrderContent ....................................................................................................................................9 PaymentDetailsandSessionInformation ...................................................................................10 ShopperInformation .......................................................................................................................11 XMLDirectOrderExample ...........................................................................................................12 ResponsefromthePaymentService .................................................................................................15 Introduction......................................................................................................................................15 ReplytoanXMLDirectOrder.......................................................................................................15 PostinganXMLOrder ........................................................................................................................17 Introduction......................................................................................................................................17 SettinguptheConnection..............................................................................................................17 Submittinga3DSecureOrder..........................................................................................................18 Introduction......................................................................................................................................18 TheProcessFlow .............................................................................................................................18 XMLMessagesandHTMLRedirect .............................................................................................20 TestEnvironment ............................................................................................................................24 Appendices...........................................................................................................................................26 Introduction......................................................................................................................................26 PaymentMethodCodes .................................................................................................................26 ISOCurrencyCodes........................................................................................................................28 AcquirerResponseCodes...............................................................................................................31 ISOCountryCodes..........................................................................................................................34
ii
Table Of Contents
iii
Copyright
2008WorldPay.Allrightsreserved. Whileeveryefforthasbeenmadetoensuretheaccuracyoftheinformationcontainedin thispublication,theinformationissuppliedwithoutrepresentationorwarrantyofany kind,issubjecttochangewithoutnoticeanddoesnotrepresentacommitmentonthepart ofWorldPayLtd.WorldPayLtd,therefore,assumesnoresponsibilityandshallhaveno liability,consequentialorotherwise,ofanykindarisingfromthismaterialoranypart thereof,oranysupplementarymaterialssubsequentlyissuedbyWorldPayLtd.WorldPay Ltdhasmadeeveryefforttoensuretheaccuracyofthismaterial.
SubmittingTransactionsintheDirectModelPage1
Introduction
Introduction
Security
AcoreissueassociatedwithusingtheXMLDirectmodelissecurity.Thecollectionand storageofpaymentinformation,suchas,cardnumbersandcardholdernamesmusttake placeinasecureenvironment.
SubmittingTransactionsintheDirectModelPage2
Introduction
SubmittingTransactionsintheDirectModelPage3
Introduction
Fromatechnical/ITviewpoint,settingupasuccessfulconnectionbetweenyoursystem andtheWorldPaypaymentsystem,involvesthefollowingmajorsteps: ordercreation:automatingthecreationofanXMLdocumentthatconformswith therulesspecifiedintheWorldPayDocumentTypeDefinition(DTD),fromorder datacapturedfromyourshoppersbyyoursystems.Thistopiciscoveredindetail inthisguide. Ordercreationcanbeachievedinanumberofdifferentways dependingonthescriptinglanguagethatyouareusing.Thisguide providesanoverviewonly.WorldPaycannotadviseonhowto specificallycreateanXMLorderusingASPorPHP,orhowto establishthesecureconnection.
accountsettings:beforesendingtestorderstothePaymentServicecheckand,if necessary,updatesettingsthatcontrolaspectsofhowtheserviceworks.For example,settingadelaybetweenauthorisationandcapture. ordersubmission:settingupanHTTP(S)connectionbetweenyoursystemandours andautomatingthesendingofXMLordersoverthatconnection.Thistopicis coveredinthisguide. paymentresponse:automatethereceptionandprocessingofrepliesfromour system.Youhaveachoiceofhowyouautomatethereceptionofrepliesusingone ofthefollowingtwomethods. o HTTP(S)PaymentResponsefeature(callback)whenenabled,WorldPay willsendanHTTPPOSTofthepaymentinformationfromourservertoa URLonyourserverviaHTTP(S).Fordetails,refertothe(HTML) PaymentResponseguide. OrderNotificationswhenenabled,youcanreportonpaymentstatus changesofindividualpayments.Usingthisfunctionalityyoucanselect thechannel(protocol)andformat.Ordernotificationscanbesentthrough twodifferentchannels:email(SMTP)andHTTP(S)andindifferent formats:CGI,textandXML.
SubmittingTransactionsintheDirectModelPage4
WorldPaysRemoteAdministrationfeature.Thisfeatureenablesyouto completeatransactionafteracapturedelay,orrefundacaptured transaction. OrderModificationsandInquiries.Thisfunctionalityautomatesthe creationofXMLstatementsthatconformtotherulesasspecifiedinthe WorldPayDTD,tomodifyandqueryorderdatainoursystem.This serviceenablesyoutocancel,captureorrefundthepaymentthatbelongs toanorder,ortoaddabackofficecodetoanorder.Additionally,by sendinganXMLorderinquiryyoucanactivelyinquireaboutthecurrent paymentstatusofanexistingorder.
Pleasenotethefollowingbeforeproceeding.
Account Settings
Anumberofthesettingsthataffectthewaytheserviceworks,canonlybemodifiedvia ouronlineadministrationtool,theMerchantAdministrationInterface.Mostsettingscan beamendedfromwithintheInstallationpageoftheMerchantAdministrationInterface. Thisincludesthesettingsforadministratingthereceptionandprocessingofrepliesfrom theWorldPaysystem. Notetoremember:youhaveaseparateMerchantAdministrationInterfaceforyour ProductionenvironmentandforyourTestenvironment.Youcanlogintoboth,via:
http://www.worldpay.com/admin
SubmittingTransactionsintheDirectModelPage5
SubmittingTransactionsintheDirectModelPage6
parsedcharacterdata(PCDATA) characterdata(CDATA)orconstants.
TheDTDcanbefoundat:http://dtd.worldpay.com/paymentService_v1.dtd
Name Tokens
AnXMLnametokenconsistsofalphanumericand/orideographiccharactersandthe punctuationmarks[_],[],[.],and[:].Noothercharactersareallowed.AnXMLname tokenmaynotcontainwhitespaces. Ifanattributeisdeclaredtocontainanametokenorlistofnametokens,thevaluesof theseattributesmustbelegalXMLnametokens.Belowyoucanfindanexampleofthis:
<!ELEMENT amount EMPTY> <!ATTLIST amount value NMTOKEN #REQUIRED currencyCode NMTOKEN #REQUIRED exponent (0 | 2 | 3 ) #REQUIRED debitCreditIndicator (debit | credit ) 'credit' >
Avalidinstanceofanamountelementlookslikethis:
<amount value="4938" currencyCode="SEK" exponent="2" />
PCDATA
InaPCDATA(ParsedCharacterDATA)blockintheXMLmessagethefollowingspecial charactersshouldnotbeincluded:[&],[<],[>]and[].Ifyouneedtousethesecharacters withinaPCDATAblockyoushouldspecifythemasfollows: &=& >=> <=< =" Forexample,forthedescriptionelementwhichisdeclaredtocontainPCDATA <!ELEMENTdescription(#PCDATA)>avalidexamplewouldbe:
<description>Your Holland & Holland Catalogue</description>
CDATA
InaCDATA(CharacterDATA)blockitisallowedtoincludeanydata/charactersaslong asitadherestothespecifiedencodinganddoesnotcontainthecharactersequence: ]]>. ACDATAblockmustbeenclosedbetweenthestarttag<[CDATA[andtheendtag]]>. Forexample:
<[CDATA[This text has not been parsed & still can be used]]>
SubmittingTransactionsintheDirectModelPage7
Introduction
OrderssubmittedtotheWorldPaysystemarerequiredtobevalidXMLfilesasspecified inthisguideandintheDocumentTypeDefinition(DTD),availableat:
http://dtd.worldpay.com
XMLfilesarevalidiftheyarewellformed,thatis,theyhaveacorrectXMLsyntax,and conformtoaDocumentTypeDefinition. Thetopicscoveredinthischapterare: XMLandDocumentTypeDeclaration MerchantandServicespecificInformation OrderDescriptionandAmount OrderContent PaymentDetailsandSessionInformation ShopperInformation XMLOrderExample
Notefordetailsofsubmittinga3DSecurepaymentrequest,pleaserefertothechapter Submittinga3DSecureOrder.
SubmittingTransactionsintheDirectModelPage8
ThepaymentServiceelementcontainsthechildelement<submit>toclassifytheXML messageasasubmission.
Order Content
ThethirdchildelementoftheorderelementisorderContent.Youcandeliverthe ordercontentinHTMLformat.WhensupplyingHTMLordercontenttheonlyHTMLtags allowedarethetagspermittedbetweenthe<body>and</body>tagsofavalidHTML document!Noformofscriptingisallowedintheordercontent. Theordercontentmustbelessthan10kilobytesandshouldalwaysbeincludedina CDATAsectiontoavoidparsingproblems.
SubmittingTransactionsintheDirectModelPage9
Theordercontentmaycontain: ordercode product(s)and/orservice(s)ordered itemprice totalamount shopperbillingaddress shoppershippingaddress contactdetailsmerchant thefactthatWorldPayprocessesthepayment thefactthatthenameWorldPaymayappearontheshoppersbankorcreditcard statements.
AnexampleofthepaymentDetailsforaVISApayment,whereVISA-SSListhe paymentmethodcode,is:
SubmittingTransactionsintheDirectModelPage10
<paymentDetails> <VISA-SSL> <cardNumber>4444333322221111</cardNumber> <expiryDate> <date month="09" year="2009"/> </expiryDate> <cardHolderName>J. Shopper</cardHolderName> <cvc>123</cvc> <cardAddress> <address> <firstName>John</firstName> <lastName>Shopper</lastName> <street>47A Queensbridge Rd</street> <!-- We recommend that you include the whole address in this field with the exception of postalCode and CountryCode.> <postalCode>CB94BQ</postalCode> <countryCode>GB</countryCode> <telephoneNumber>0123456789</telephoneNumber> </address> </cardAddress> </VISA-SSL> <session shopperIPAddress="123.123.123.123" id="02l5ui8ib1"/> </paymentDetails>
Shopper Information
YoucanprovideextrainformationabouttheshopperinanXMLorderbyusingthe orderchildelementshopper.ItsshopperEmailAddresselementisusedby WorldPaytoidentifypossiblefraudulenttransactions,ortosendanemailtotheshopper whenthepaymentisauthorisedorrefused.
<shopper> <shopperEmailAddress>jshopper@myprovider.int</shopperEmailAddress> </shopper>
SubmittingTransactionsintheDirectModelPage11
SubmittingTransactionsintheDirectModelPage12
<!-- Please note that if no house or apartment number is included then a house name can be included using the <houseName> element.--> <postalCode>CB94BQ</postalCode> <city>Cambridge</city> <countryCode>GB</countryCode> <telephoneNumber>01234567890</telephoneNumber> </address> </cardAddress> </VISA-SSL> <session shopperIPAddress="123.123.123.123" id="0215ui8ib1" /> </paymentDetails> <shopper> <shopperEmailAddress>jshopper@myprovider.int</shopperEmailAddress> </shopper> <shippingAddress> <address> <firstName>John</firstName> <lastName>Shopper</lastName> <street>47A Queensbridge Rd<street/> <!-- We recommend that you include the whole address in this field with the exception of postalCode and CountryCode..--> <postalCode>CB94BQ</postalCode> countryCode>GB</countryCode> <telephoneNumber>01234567890</telephoneNumber> </address> </shippingAddress> </order> </submit> </paymentService>
SubmittingTransactionsintheDirectModelPage13
SubmittingTransactionsintheDirectModelPage14
Introduction
WhenthePaymentServicehasreceivedavalidorderwithpaymentdetailsitwillsend theinformationtothefinancialinstitutions(acquirers)forauthorisation.Theresultofthe authorisationrequestisreportedtoWorldPayonlineaseitherAUTHORISEDor REFUSED.IntheXMLDirectmodel,WorldPaysendsanXMLresponsetoyoursystem thatcontainsthepaymentstatusoftheorder. WhenparsingWorldPaysreplyitisimportantthatyouuseanindustrystandardXML parser.Donotdependonahomemadeone,whichmaynotbeabletocorrectlyinterpret themessagesreceivedfromWorldPay.ForvariousplatformsdifferentXMLparsersexist. Pleaserefertohttp://www.xml.org. Thetopicscoveredinthischapterarelistedbelow. ReplytoanXMLDirectOrder
Notefordetailsofrepliesinresponsetoa3DSecurepaymentrequest,pleaserefertothe chapterSubmittinga3DSecureOrder.
SubmittingTransactionsintheDirectModelPage15
Inthereply,thepaymentelementholdstherelevantpaymentdetailsandstatus information.ItschildelementspaymentMethodandamountcontainthepayment methodusedandtheamount,includingthecurrency,itsexponentandthe debitCreditIndicatorthatindicatestheamountispositive. ThepaymentstatusisspecifiedbythelastEventelement.ACVCresultdescriptionis reportedthroughtheCVCResultCode element.Thebalanceelementreportsonthe balanceintheIN_PROCESS_AUTHORISEDaccount.Forcreditcardpaymentsthefirst andlastfourdigitsofthecardnumberarereturnedinthecardNumberelement. AlwaysrefertotheWorldPayDTDforanuptodatelistofchildelementsandattributes ofthereplyelement.
SubmittingTransactionsintheDirectModelPage16
Introduction
TosubmitanXMLorderyouhavetosetupanHTTP(S)connectiontothePayment Service.HowyoucreateaconnectionwiththeWorldPayserverdependsonthe specificationsofyourplatform. Thetopicscoveredinthischapterarelistedbelow. o SettinguptheConnection
SubmittingTransactionsintheDirectModelPage17
Introduction
Thischapterdescribeshowyoushouldimplement3DSecureAuthenticationusingthe XMLDirectmodel.ThisprocessinvolvesprovidingrepliestotwoXMLmessagesand redirectingtheshoppertoanauthenticationpage.Thispageisprovidedandhostedby theshoppersCardIssuer.PleasenotethatourTestEnvironmentenablesyoutotestyour implementation. Implementinga3DSecureAuthenticationisdescribedinthefollowingtopics: TheProcessFlowadiagramshowingtheflowofinformationduringthe authenticationprocess XMLMessagesandHTMLRedirectexamplesoftheXMLmessagesandtheHTML redirectpage o o o o o InitialOrderMessage(arrow2indiagram) InitialOrderReplyMessage(arrow3indiagram) RedirectShoppertoIssuer(arrow4indiagram) SecondOrderMessage(arrow6indiagram) SecondOrderReplyMessage(arrow8indiagram)
TestEnvironmenthowtousethetestenvironment
SubmittingTransactionsintheDirectModelPage18
Figure: The Process Flow 1. 2. 3. theshopperplacesanorderwiththemerchant themerchantsendsanXMLmessagewithorderinformationtooursystem,refer toInitialOrderMessage(arrow2) WorldPayverifythatthecardisparticipatingin3DSecureareplymessageis sentbacktothemerchanttorequestpayerauthentication,refertoInitialOrder ReplyMessage(arrow3) themerchantredirectstheshoppertotheissuersiteforauthenticationusing informationinthereplymessage,pleaserefertoRedirecttheShoppertoIssuer (arrow4) theauthenticationresponseissenttotheshopper,andthepayerauthentication responseisthenpostedtothemerchantssite themerchantincludestheauthenticationresponseintheoriginalXMLorder messageandsendsittoWorldPay,pleaserefertoSecondOrderMessage(arrow 6) iftheauthenticationresponseshowsthattheshopperfailedtoauthenticate themselves,thenthemerchantwillreceiveeitheraRefusedmessagefrom WorldPayiftheRiskManagementModule(RMM)isactivatedoriftheRMMis notactivatedthenyouwillreceivethe3DSecurereferralmessageagain(step3) iftheauthenticationresponseshowsthattheshopperwasauthenticatedthenwe verifythattheauthenticationresponsebelongstotheauthenticationrequestand proceedwithauthorisationexchangewiththeacquirer,includingthe3DSecurity Authenticationinformation afterreceivingtheresponsefromtheacquirer,WorldPaysendanauthorisation responsetothemerchant,pleaserefertoSecondOrderReplyMessage(arrow9)
4.
5. 6.
7.
8.
9.
SubmittingTransactionsintheDirectModelPage19
SubmittingTransactionsintheDirectModelPage20
SubmittingTransactionsintheDirectModelPage21
<html> <head> <title>3-D Secure helper page</title> </head> <body OnLoad="OnLoadEvent();"> This page should forward you to your own card issuer for identification. If your browser does not start loading the page, press the button you see. <br/> After you successfully identify yourself you will be sent back to this site where the payment process will continue as if nothing had happened.<br/> implemented... <form name="theForm" method="POST" action="value of the issuerUrl element" > <input type="hidden" name="PaReq" value="value of the paRequest element" /> <input type="hidden" name="TermUrl" value="url of merchant site" /> <input type="hidden" name="MD" value="merchant supplied data" /> <input type="submit" name="Identify yourself" /> </form> <script language="Javascript"> <!-function OnLoadEvent() { // Make the form post as soon as it has been loaded. document.theForm.submit(); } // --> </script> </body> </html>
SubmittingTransactionsintheDirectModelPage22
Theinfo3DSecureelementcontainsthepayerauthenticationresponsedatareceivedby theshopper/merchantfromtheissuer. IntheechoDataelement,themerchantmustsupplythesamedataasitreceivedinthe firstreplymessage. Notethatweuseafarmofwebserverstoservetherequestsand WorldPayneedtoensurethatthefirstandsecondordersare successfullymatchedup.Inordertofacilitatethis,youneedto extractthesessioncookiethatispassedbackintheheaderofthe XMLdocument(theresponsefromthePaymentService)andreturn itintheheaderofthesecondXMLorder.
Refused
IftheRiskManagementModuleisimplementedforyourAdministration,youwillreceive anormalREFUSEDreply.
<payment> <paymentMethod>MAESTRO-SSL</paymentMethod> <amount value="2750" currencyCode="GBP" exponent="2" debitCreditIndicator="credit"/> <lastEvent>REFUSED</lastEvent> <ISO8583ReturnCode code="76" description="CARD BLOCKED"/> </payment>
SubmittingTransactionsintheDirectModelPage23
Test Environment
Inorderformerchantstotesttheir3DSecureimplementation,weprovideatestpayment service.ThisservicecanbeusedtosubmitdummyXMLorders.Notethatyoumustbe enabledfor3DSecurebeforeyoucanusethetestpaymentservice.Wealsoprovidea dummyissuersitesothatpartoftheprocesscanalsobetested. ThevalueofthecardHolderNameelementintheXMLordermessagecanbeusedto manipulatethetest,asfollows: ifthecardHolderNameis3Dthenthetestenvironmentwillactasifthecredit cardisparticipatingin3DSecure(thatis,the3DSecurityDirectorywould respondwithenrolled) ifthecardHolderNameisNO3Dthenthetestenvironmentwillactasifthe creditcardisnotparticipatingin3DSecure(thatis,theDirectorywouldrespond withnotenrolled) withanyothervalueforcardHolderName,thetestenvironmentwillactasifitis anormalecommercetransaction(thatis,nolookupwiththeDirectory).
SubmittingTransactionsintheDirectModelPage24
avalueofUNKNOWN_IDENTITYmeansthattheauthenticationfailed andanyothervaluemeanstheverificationprocessitselffailed.
SubmittingTransactionsintheDirectModelPage25
Appendices
Appendices
Introduction
Theappendicesavailableforthisguidearelistedbelow. o o o o o o o PaymentMethodCodes ISOCurrencyCodes AcquirerResponseCodes ISOCountryCodes CVC/CVVChecksandResponses TestingTransactions XMLErrorCodes
Amex
AMEXSSL
Diners Card
DINERSSSL
ELV
ELVSSL
JCBCard
JCBSSL
MasterCard
ECMCSSL
SoloCard
SOLO_GBSSL
Maestro
MAESTRO SSL
SubmittingTransactionsintheDirectModelPage26
Appendices
VisaCard
VISASSL
VisaDelta
VISASSL
Visa Electron
VISASSL
Visa Purchasing
VISASSL
SubmittingTransactionsintheDirectModelPage27
Appendices
ThefullISO4217listcanbefoundat:http://www.id3.org/iso4217.html
AUD
BRL
CAD
CHF CLP
CNY
COP
CZK
DKK
EUR
SubmittingTransactionsintheDirectModelPage28
Appendices
GBP
Pound Sterling
HKD
HongKong 2 Dollar Hungarian 2 Forint Indonesian 0 Rupiah Iceland Krona Japanese Yen Kenyan Shilling South Korean Won Mexican Peso Malaysian Ringgit 2
HUF
IDR
ISK
JPY
KES
KRW
MXP
MYR
NOK
NZD
PHP
PLN
PTE
SEK
SubmittingTransactionsintheDirectModelPage29
Appendices
SGD
SKK
THB TWD
2 2
USD VND
ZAR
SubmittingTransactionsintheDirectModelPage30
Appendices
SubmittingTransactionsintheDirectModelPage31
Appendices
51LIMITEXCEEDED 55INVALIDSECURITYCODE 56UNKNOWNCARD 57ILLEGALTRANSACTION 62RESTRICTEDCARD 63SECURITYRULES VIOLATED 75SECURITYCODEINVALID 76CARDBLOCKED 85REJECTEDBYCARD ISSUER 91CREDITCARDISSUER TEMPORARILYNOT REACHABLE 97SECURITYBREACH 3INVALIDACCEPTOR 12INVALIDTRANSACTION 14INVALIDACCOUNT 19REPEATOFLAST TRANSACTION 20ACQUIRERERROR 21REVERSALNOT PROCESSED,MISSING AUTHORISATION 24UPDATEOFFILE
REFUSED
ERROR ERROR
ERROR
SubmittingTransactionsintheDirectModelPage32
Appendices
IMPOSSIBLE 25REFERENCENUMBER CANNOTBEFOUND 26DUPLICATEREFERENCE NUMBER 27ERRORINREFERENCE NUMBERFIELD 30FORMATERROR 31UNKNOWNACQUIRER ACCOUNTCODE 40REQUESTEDFUNCTION NOTSUPPORTED 58TRANSACTIONNOT PERMITTED 64AMOUNTHIGHERTHAN PREVIOUSTRANSACTION AMOUNT 68TRANSACTIONTIMED OUT 80AMOUNTNOLONGER AVAILABLE, AUTHORISATIONEXPIRED 92CREDITCARDTYPENOT PROCESSEDBYACQUIRER 94DUPLICATEREQUEST ERROR ERROR
ERROR
ERROR
ERROR ERROR
ERROR
ERROR
ERROR
ERROR
ERROR
ERROR
ERROR
SubmittingTransactionsintheDirectModelPage33
Appendices
ISOsourcereference: http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166code-lists/list-en1.html
AFGHANISTAN
AF
AX
AL
ALGERIA
DZ
AS
AD
ANGOLA
AO
ANGUILLA
AI
ANTARCTICA
AQ
ANTIGUAAND BARBUDA
AG
SubmittingTransactionsintheDirectModelPage34
Appendices
ARGENTINA
AR
ARMENIA
AM
ARUBA
AW
AUSTRALIA
AU
AUSTRIA
AT
AZERBAIJAN
AZ
BAHAMAS
BS
BAHRAIN
BH
BANGLADESH
BD
BARBADOS
BB
BELARUS
BY
BELGIUM
BE
BELIZE
BZ
BENIN
BJ
BERMUDA
BM
BHUTAN
BT
BOLIVIA
BO
BA
BW
SubmittingTransactionsintheDirectModelPage35
Appendices
BOUVETISLAND
BV
BRAZIL
BR
IO
BN
BG
BURKINAFASO
BF
BURUNDI
BI
CAMBODIA
KH
CAMEROON
CM
CANADA
CA
CAPEVERDE
CV
KY
CF
TD
CHILE
CL
CHINA
CN
CHRISTMAS ISLAND
CX
SubmittingTransactionsintheDirectModelPage36
Appendices
CC
CO
COMOROS
KM
CONGO
CG
CD
CK
COSTARICA
CR
CTEDIVOIRE
CI
CROATIA
HR
CUBA
CU
CYPRUS
CY
CZ
DK
DJIBOUTI
DJ
DOMINICA
DM
DO
EC
SubmittingTransactionsintheDirectModelPage37
Appendices
EGYPT
EG
ELSALVADOR
SV
GQ
ER
ESTONIA
EE
ETHIOPIA
ET
FK
FO
FIJI
FJ
FINLAND
FI
FRANCE
FR
GF
PF
TF
GA
GAMBIA
GM
GEORGIA
GE
SubmittingTransactionsintheDirectModelPage38
Appendices
GERMANY
DE
GHANA
GH
GIBRALTAR
GI
GREECE
GR
GREENLAND
GL
GRENADA
GD
GUADELOUPE
GP
GUAM
GU
GUATEMALA
GT
GUERNSEY
GG
GUINEA
GN
GUINEABISSAU
GW
GUYANA
GY
HAITI
HT
HM
VA
HN
SubmittingTransactionsintheDirectModelPage39
Appendices
HONGKONG
HK
HUNGARY
HU
ICELAND
IS
INDIA
IN
INDONESIA
ID
IR
IQ
IRELAND
IE
ISRAEL
IL
ITALY
IT
JAMAICA
JM
JAPAN
JP
JERSEY
JE
JORDAN
JO
KAZAKHSTAN
KZ
KENYA
KE
KIRIBATI
KI
KP
SubmittingTransactionsintheDirectModelPage40
Appendices
KR
KW
KYRGYZSTAN
KG
LA
LV
LEBANON
LB
LESOTHO
LS
LIBERIA
LR
LY
LI
LITHUANIA
LT
LUXEMBOURG
LU
MACAO
MO
MK
MG
MALAWI
MW
MALAYSIA
MY
SubmittingTransactionsintheDirectModelPage41
Appendices
MALDIVES
MV
MALI
ML
MALTA
MT
MH
MQ
MAURITANIA
MR
MAURITIUS
MU
MAYOTTE
YT
MEXICO
MX
FM
MD
MC
MONGOLIA
MN
MONTSERRAT
MS
MOROCCO
MA
MOZAMBIQUE
MZ
MYANMAR
MM
NAMIBIA
NA
SubmittingTransactionsintheDirectModelPage42
Appendices
NAURU
NR
NEPAL
NP
NETHERLANDS
NL
AN
NC
NZ
NICARAGUA
NI
NIGER
NE
NIGERIA
NG
NIUE
NU
NF
MP
NO
OMAN
OM
PAKISTAN
PK
PALAU
PW
PS
SubmittingTransactionsintheDirectModelPage43
Appendices
PANAMA
PA
PG
PY
PERU
PE
PHILIPPINES
PH
PITCAIRN
PN
POLAND
PL
PORTUGAL
PT
PUERTORICO
PR
QATAR
QA
RUNION
RE
ROMANIA
RO
RU
RW
BL
SH
KN
LC
SubmittingTransactionsintheDirectModelPage44
Appendices
PM
VC
WS
SANMARINO
SM
ST
SA
SENEGAL
SN
SERBIA
CS
SEYCHELLES
SC
SIERRALEONE
SL
SINGAPORE
SG
SLOVAKIA
SK
SLOVENIA
SI
SB
SO
SOUTHAFRICA
ZA
GS
SubmittingTransactionsintheDirectModelPage45
Appendices
ISLANDS SPAIN ES
SRILANKA
LK
SUDAN
SD
SURINAME
SR
SJ
SZ
SWEDEN
SE
SWITZERLAND
CH
SY
TW
TJ
TZ
TH
TIMORLESTE
TL
TOGO
TG
TOKELAU
TK
SubmittingTransactionsintheDirectModelPage46
Appendices
TONGA
TO
TT
TN
TURKEY
TR
TURKMENISTAN
TM
TC
TV
UGANDA
UG
UKRAINE
UA
AE
GB
US
UM
UY
UZBEKISTAN
UZ
VANUATU
VU
SubmittingTransactionsintheDirectModelPage47
Appendices
VA
VE
VIETNAM
VN
VIRGIN ISLANDS, BRITISH VIRGIN ISLANDS,U.S. WALLISAND FUTUNA WESTERN SAHARA YEMEN
VG
VI
WF
EH
YE
ZAMBIA
ZM
ZIMBABWE
ZW
SubmittingTransactionsintheDirectModelPage48
Appendices
Testing
ThefollowingCVC/CVVscenarioscanbetestedusingthecodeslistedbelow. CVC/CVV code Leftblank simulated situation NOTSUPPLIED BYSHOPPER NOTSENTTO ACQUIRER NORESPONSE FROM ACQUIRER NOTCHECKED BYACQUIRER FAILED APPROVED numeric response 1
111
222
333
444 555
5 6
SubmittingTransactionsintheDirectModelPage49
Appendices
Testing Transactions
Anumberofdifferentcasescanbetestedbyenteringthefollowingvaluesasthe card/accountholdername(<cardHolderName>)intheorder: REFUSEDwillsimulatearefusedpayment REFERREDwillsimulatearefusalwiththerefusalreasonreferred FRAUDwillsimulatearefusalwiththerefusalreasonfraudsuspicion ERRORwillsimulateapaymentthatendsinerror.
4462030000000000
16
13 16 15
0 0 0
14 16 16
0 0 0
SubmittingTransactionsintheDirectModelPage50
Appendices
16 18 16
0 1 0
18 16 16
0 0 0
NotethatVisaPurchasingtransactionsaretreatedasVisacredit cardtransactions.
German ELV
TotestGermanELVpaymentsintheTestenvironmentacorrectlyformattedaccount number(Kontonummer)andvalidbankcode(Bankleitzahl)shouldbeused,forexample: Accountnumber:12345678 Bankcode:10000000 Bankname:Bundesbank Bankresidence:Berlin card type ELV ELV ELV PleasenotethatELVmustbeactivatedintheProductionenvironmentformerchantswho wouldliketotestELVtransactions. bank code 20030000 43050001 30070024 account number 92441196 122108525 5929120
SubmittingTransactionsintheDirectModelPage51
Appendices
ForfulldetailsofourDTD,referto:http://dtd.worldpay.com/paymentService_v1.dtd
Examples
Thefollowingaresomeexamplesfortheseerrorcodes.
Error Code 2
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd"> <paymentService version="1.3" merchantCode="MYCO"> <reply> <error code="2"><![CDATA[Invalid bankAccount details : Invalid payment details : Account and bankcode combination is incorrect]]></error> </reply> </paymentService>
Error Code 4
<?xml version="1.0"?> <!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd"> <paymentService merchantCode="MYCO" version="1.3"> <reply> <error code="4"><![CDATA[IP check failed. Access denied.]]></error> </reply> </paymentService>
Error Code 5
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd"> <paymentService version="1.3" merchantCode="MYCO"> <reply> <orderStatus orderCode="12234"> <error code="5"><![CDATA[Cannot book payment to CANCELLED if paymentstatus is not AUTHORISED but : REFUSED]]></error> </orderStatus>
SubmittingTransactionsintheDirectModelPage52
Appendices
</reply> </paymentService>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN""http://dtd.worldpay.com/paymentService_v1.dtd"> <paymentService version="1.3" merchantCode="MYCO"> <reply> <error code="5"><![CDATA[Duplicate Order]]></error> </reply> </paymentService>
<?xml version="1.0"?> <!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN""http://dtd.worldpay.com/paymentService_v1.dtd"><paymentService merchantCode="MYCO" version="1.4"> <reply> <orderStatus orderCode="11223"> <error code="5"><![CDATA[Requested capture amount (EUR 125,50) exceeds the authorised balance for this payment (EUR 115,50)]]></error> </orderStatus> </reply> </paymentService>
Error Code 7
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd"><paymentService version="1.3" merchantCode="MYCO"> <reply> <orderStatus orderCode="1112"> <error code="7"><![CDATA[Invalid payment details : Expiry date = 012002]]></error> </orderStatus> </reply> </paymentService>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN" "http://dtd.worldpay.com/paymentService_v1.dtd"> <paymentService version="1.4" merchantCode="MYCO"> <reply> <orderStatus orderCode="11223"> <error code="7"><![CDATA[Gateway error]]></error> </orderStatus> </reply> </paymentService>
SubmittingTransactionsintheDirectModelPage53