{"_id":"59cadbb422e21c001a36001b","project":"55b933b3146ef121002158d3","version":{"_id":"5632a5e549e16d0d00122443","__v":6,"project":"55b933b3146ef121002158d3","createdAt":"2015-10-29T23:04:05.701Z","releaseDate":"2015-10-29T23:04:05.701Z","categories":["5632a5e749e16d0d00122444","5632a5e749e16d0d00122445","5632a5e749e16d0d00122446","5632a5e749e16d0d00122447","5632a5e749e16d0d00122448","5632a5e749e16d0d00122449","5632a5e749e16d0d0012244a","5632a5e749e16d0d0012244b","5632a5e749e16d0d0012244c","5632a5e749e16d0d0012244d","5632a5e749e16d0d0012244e","5632a5e749e16d0d0012244f","5632a5e749e16d0d00122450","5632b179df556c0d00cd095b","564e13053b2b4a19000cd69b","59caa9df65accc001a489c95","59cab50965accc001a489d28","59cadd464ab7b70024378e74"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.1.0","version":"1.1"},"category":{"_id":"59cab50965accc001a489d28","project":"55b933b3146ef121002158d3","version":"5632a5e549e16d0d00122443","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-09-26T20:14:01.669Z","from_sync":false,"order":8,"slug":"tokenization","title":"Tokenization"},"user":"55b932ba8fd1a02b00f496c8","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-09-26T22:59:00.893Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:api-header]\n{\n  \"title\": \"Description\"\n}\n[/block]\nTokenizes a collection of credit cards.\n[block:api-header]\n{\n  \"title\": \"Syntax\"\n}\n[/block]\nCreditCardToken[] saveCards ( ueSecurityToken Token, CreditCardData[] CreditCards )\n[block:api-header]\n{\n  \"title\": \"Arguments\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Type\",\n    \"h-1\": \"Name\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"[ueSecurityToken](doc:uesecuritytoken)\",\n    \"1-0\": \"[CreditCardData](doc:creditcarddata) []\",\n    \"1-1\": \"CreditCards\",\n    \"0-1\": \"Token\",\n    \"0-2\": \"Merchant security token: used to identify merchant and validate transaction.\",\n    \"1-2\": \"Array of credit card data objects.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Return Value\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"[CreditCardToken](doc:creditcardtoken) []\",\n    \"0-1\": \"Returns an array of card token objects\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Examples\"\n}\n[/block]\n**PHP**\n\nFor directions on how to set up the WSDL link, create “$token” and “$client”, go to [PHP Guide](doc:php-guide) \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php \\n \\ntry { \\n \\n    $Cards = array();\\n    $Cards[] =  array( \\n      'CardNumber' => '4444555566667779', \\n      'CardExpiration' => '1015', \\n    ); \\n    $Cards[] =  array( \\n      'CardNumber' => '5555444433332226', \\n      'CardExpiration' => '0216', \\n    ); \\n \\n  $tokens=$client->saveCards($token, $Cards); \\n \\n \\n} \\n \\ncatch (SoapFault $e) { \\n  die(\\\"saveCards failed :\\\" .$e->getMessage()); \\n} \\n \\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Request: \\n\\n<SOAP-ENV:Envelope \\n   xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" \\n   xmlns:ns1=\\\"urn:usaepay\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" \\n   xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" \\n   xmlns:SOAP-ENC=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\" \\n   SOAP-ENV:encodingStyle=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\">\\n<SOAP-ENV:Body>\\n<ns1:saveCards>\\n<Token xsi:type=\\\"ns1:ueSecurityToken\\\">\\n<ClientIP xsi:type=\\\"xsd:string\\\">192.168.0.1</ClientIP>\\n<PinHash xsi:type=\\\"ns1:ueHash\\\">\\n<HashValue xsi:type=\\\"xsd:string\\\">30253a800ca37f11c46df86be585b1d882887120</HashValue>\\n<Seed xsi:type=\\\"xsd:string\\\">13656302101510261731</Seed>\\n<Type xsi:type=\\\"xsd:string\\\">sha1</Type>\\n</PinHash>\\n<SourceKey xsi:type=\\\"xsd:string\\\">_Ss7g8t6UW9b1Py6474F5Z1A8fmo22x2</SourceKey>\\n</Token>\\n<CreditCards SOAP-ENC:arrayType=\\\"ns1:CreditCardData[3]\\\" xsi:type=\\\"ns1:CreditCardDataArray\\\">\\n<item xsi:type=\\\"ns1:CreditCardData\\\">\\n  <AvsStreet xsi:type=\\\"xsd:string\\\">298 State st</AvsStreet>\\n  <AvsZip xsi:type=\\\"xsd:string\\\">12210</AvsZip>\\n  <CardExpiration xsi:type=\\\"xsd:string\\\">0214</CardExpiration>\\n  <CardNumber xsi:type=\\\"xsd:string\\\">4444555566667779</CardNumber>\\n</item>\\n<item xsi:type=\\\"ns1:CreditCardData\\\">\\n  <AvsStreet xsi:type=\\\"xsd:string\\\">298 State st</AvsStreet>\\n  <AvsZip xsi:type=\\\"xsd:string\\\">12210</AvsZip>\\n  <CardExpiration xsi:type=\\\"xsd:string\\\">0216</CardExpiration>\\n  <CardNumber xsi:type=\\\"xsd:string\\\">5555444433332226</CardNumber>\\n</item>\\n<item xsi:type=\\\"ns1:CreditCardData\\\">\\n  <AvsStreet xsi:type=\\\"xsd:string\\\">298 State st</AvsStreet>\\n  <AvsZip xsi:type=\\\"xsd:string\\\">12210</AvsZip>\\n  <CardExpiration xsi:type=\\\"xsd:string\\\">1015</CardExpiration>\\n  <CardNumber xsi:type=\\\"xsd:string\\\">371122223332225</CardNumber>\\n</item>\\n</CreditCards>\\n</ns1:saveCards>\\n</SOAP-ENV:Body>\\n</SOAP-ENV:Envelope>\\n\\n-----------------------------------------------------------------\\nResponse:\\n\\n<SOAP-ENV:Envelope \\n   xmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\"\\n   xmlns:ns1=\\\"urn:usaepay\\\" \\n   xmlns:SOAP-ENC=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\" \\n   xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" \\n   xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" \\n   SOAP-ENV:encodingStyle=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\">\\n<SOAP-ENV:Body>\\n<ns1:saveCardsResponse>\\n<saveCardsReturn SOAP-ENC:arrayType=\\\"ns1:CreditCardToken[3]\\\" xsi:type=\\\"ns1:CreditCardTokenArray\\\">\\n<item xsi:type=\\\"ns1:CreditCardToken\\\">\\n<CardRef xsi:type=\\\"xsd:string\\\">o58j-duhc-57nk-jlc3</CardRef>\\n<CardExpiration xsi:type=\\\"xsd:string\\\">2014-02</CardExpiration>\\n<CardNumber xsi:type=\\\"xsd:string\\\">XXXXXXXXXXXX7779</CardNumber>\\n<CardType xsi:type=\\\"xsd:string\\\">Visa</CardType>\\n</item>\\n<item xsi:type=\\\"ns1:CreditCardToken\\\">\\n<CardRef xsi:type=\\\"xsd:string\\\">lu8p-ftcm-foxs-ehw7</CardRef>\\n<CardExpiration xsi:type=\\\"xsd:string\\\">2016-02</CardExpiration>\\n<CardNumber xsi:type=\\\"xsd:string\\\">XXXXXXXXXXXX2226</CardNumber>\\n<CardType xsi:type=\\\"xsd:string\\\">Master</CardType>\\n</item>\\n<item xsi:type=\\\"ns1:CreditCardToken\\\">\\n<CardRef xsi:type=\\\"xsd:string\\\">29lz-vz21-fk5c-93t7</CardRef>\\n<CardExpiration xsi:type=\\\"xsd:string\\\">2015-10</CardExpiration>\\n<CardNumber xsi:type=\\\"xsd:string\\\">XXXXXXXXXXX2225</CardNumber>\\n<CardType xsi:type=\\\"xsd:string\\\">AmEx</CardType>\\n</item>\\n</saveCardsReturn>\\n</ns1:saveCardsResponse>\\n</SOAP-ENV:Body>\\n</SOAP-ENV:Envelope>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"savecards","type":"basic","title":"saveCards"}
[block:api-header] { "title": "Description" } [/block] Tokenizes a collection of credit cards. [block:api-header] { "title": "Syntax" } [/block] CreditCardToken[] saveCards ( ueSecurityToken Token, CreditCardData[] CreditCards ) [block:api-header] { "title": "Arguments" } [/block] [block:parameters] { "data": { "h-0": "Type", "h-1": "Name", "h-2": "Description", "0-0": "[ueSecurityToken](doc:uesecuritytoken)", "1-0": "[CreditCardData](doc:creditcarddata) []", "1-1": "CreditCards", "0-1": "Token", "0-2": "Merchant security token: used to identify merchant and validate transaction.", "1-2": "Array of credit card data objects." }, "cols": 3, "rows": 2 } [/block] [block:api-header] { "title": "Return Value" } [/block] [block:parameters] { "data": { "0-0": "[CreditCardToken](doc:creditcardtoken) []", "0-1": "Returns an array of card token objects" }, "cols": 2, "rows": 1 } [/block] [block:api-header] { "title": "Examples" } [/block] **PHP** For directions on how to set up the WSDL link, create “$token” and “$client”, go to [PHP Guide](doc:php-guide) [block:code] { "codes": [ { "code": "<?php \n \ntry { \n \n $Cards = array();\n $Cards[] = array( \n 'CardNumber' => '4444555566667779', \n 'CardExpiration' => '1015', \n ); \n $Cards[] = array( \n 'CardNumber' => '5555444433332226', \n 'CardExpiration' => '0216', \n ); \n \n $tokens=$client->saveCards($token, $Cards); \n \n \n} \n \ncatch (SoapFault $e) { \n die(\"saveCards failed :\" .$e->getMessage()); \n} \n \n?>", "language": "php" } ] } [/block] [block:code] { "codes": [ { "code": "Request: \n\n<SOAP-ENV:Envelope \n xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" \n xmlns:ns1=\"urn:usaepay\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" \n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" \n SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n<SOAP-ENV:Body>\n<ns1:saveCards>\n<Token xsi:type=\"ns1:ueSecurityToken\">\n<ClientIP xsi:type=\"xsd:string\">192.168.0.1</ClientIP>\n<PinHash xsi:type=\"ns1:ueHash\">\n<HashValue xsi:type=\"xsd:string\">30253a800ca37f11c46df86be585b1d882887120</HashValue>\n<Seed xsi:type=\"xsd:string\">13656302101510261731</Seed>\n<Type xsi:type=\"xsd:string\">sha1</Type>\n</PinHash>\n<SourceKey xsi:type=\"xsd:string\">_Ss7g8t6UW9b1Py6474F5Z1A8fmo22x2</SourceKey>\n</Token>\n<CreditCards SOAP-ENC:arrayType=\"ns1:CreditCardData[3]\" xsi:type=\"ns1:CreditCardDataArray\">\n<item xsi:type=\"ns1:CreditCardData\">\n <AvsStreet xsi:type=\"xsd:string\">298 State st</AvsStreet>\n <AvsZip xsi:type=\"xsd:string\">12210</AvsZip>\n <CardExpiration xsi:type=\"xsd:string\">0214</CardExpiration>\n <CardNumber xsi:type=\"xsd:string\">4444555566667779</CardNumber>\n</item>\n<item xsi:type=\"ns1:CreditCardData\">\n <AvsStreet xsi:type=\"xsd:string\">298 State st</AvsStreet>\n <AvsZip xsi:type=\"xsd:string\">12210</AvsZip>\n <CardExpiration xsi:type=\"xsd:string\">0216</CardExpiration>\n <CardNumber xsi:type=\"xsd:string\">5555444433332226</CardNumber>\n</item>\n<item xsi:type=\"ns1:CreditCardData\">\n <AvsStreet xsi:type=\"xsd:string\">298 State st</AvsStreet>\n <AvsZip xsi:type=\"xsd:string\">12210</AvsZip>\n <CardExpiration xsi:type=\"xsd:string\">1015</CardExpiration>\n <CardNumber xsi:type=\"xsd:string\">371122223332225</CardNumber>\n</item>\n</CreditCards>\n</ns1:saveCards>\n</SOAP-ENV:Body>\n</SOAP-ENV:Envelope>\n\n-----------------------------------------------------------------\nResponse:\n\n<SOAP-ENV:Envelope \n xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"\n xmlns:ns1=\"urn:usaepay\" \n xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" \n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" \n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\n<SOAP-ENV:Body>\n<ns1:saveCardsResponse>\n<saveCardsReturn SOAP-ENC:arrayType=\"ns1:CreditCardToken[3]\" xsi:type=\"ns1:CreditCardTokenArray\">\n<item xsi:type=\"ns1:CreditCardToken\">\n<CardRef xsi:type=\"xsd:string\">o58j-duhc-57nk-jlc3</CardRef>\n<CardExpiration xsi:type=\"xsd:string\">2014-02</CardExpiration>\n<CardNumber xsi:type=\"xsd:string\">XXXXXXXXXXXX7779</CardNumber>\n<CardType xsi:type=\"xsd:string\">Visa</CardType>\n</item>\n<item xsi:type=\"ns1:CreditCardToken\">\n<CardRef xsi:type=\"xsd:string\">lu8p-ftcm-foxs-ehw7</CardRef>\n<CardExpiration xsi:type=\"xsd:string\">2016-02</CardExpiration>\n<CardNumber xsi:type=\"xsd:string\">XXXXXXXXXXXX2226</CardNumber>\n<CardType xsi:type=\"xsd:string\">Master</CardType>\n</item>\n<item xsi:type=\"ns1:CreditCardToken\">\n<CardRef xsi:type=\"xsd:string\">29lz-vz21-fk5c-93t7</CardRef>\n<CardExpiration xsi:type=\"xsd:string\">2015-10</CardExpiration>\n<CardNumber xsi:type=\"xsd:string\">XXXXXXXXXXX2225</CardNumber>\n<CardType xsi:type=\"xsd:string\">AmEx</CardType>\n</item>\n</saveCardsReturn>\n</ns1:saveCardsResponse>\n</SOAP-ENV:Body>\n</SOAP-ENV:Envelope>", "language": "xml" } ] } [/block]