Skip to content

Instantly share code, notes, and snippets.

@jknipp
Last active April 18, 2024 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jknipp/d0b1fcfe8cda87764d3ae3af8f65c0dd to your computer and use it in GitHub Desktop.
Save jknipp/d0b1fcfe8cda87764d3ae3af8f65c0dd to your computer and use it in GitHub Desktop.
Pedidosya Cybersource Deliver body
// Replace instances of {{payment_method_token}} and {{certificate_token}} with the payment method token and certificate token
{
"delivery": {
"payment_method_token": "{{payment_method_token}}",
"url": "https://ics2wstesta.ic3.com/commerce/1.x/transactionProcessor",
"body": "{{#xml_dsig}}{{#private_key}}{{certificate_token}}{{/private_key}},<?xml version=\"1.0\" encoding=\"UTF-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap:Header><wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" soap:mustUnderstand=\"1\"><wsse:BinarySecurityToken EncodingType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary\" ValueType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3\" wsu:Id=\"X509-C2457C93F643278DC9156537520773341\">{{#binary_security_token}}{{#certificate}}{{certificate_token}}{{/certificate}}{{/binary_security_token}}</wsse:BinarySecurityToken><wsu:Timestamp xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"><wsu:Created>{{#utc_timestamp}}{{/utc_timestamp}}</wsu:Created></wsu:Timestamp><ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Id=\"SIG-C2457C93F643278DC9156537520773445\"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"><ec:InclusiveNamespaces xmlns:ec=\"http://www.w3.org/2001/10/xml-exc-c14n#\" PrefixList=\"soap\"/></ds:CanonicalizationMethod><ds:SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#rsa-sha256\"/><ds:Reference URI=\"#id-C2457C93F643278DC9156537520773444\"><ds:Transforms><ds:Transform Algorithm=\"http://www.w3.org/2001/10/xml-exc-c14n#\"><ec:InclusiveNamespaces xmlns:ec=\"http://www.w3.org/2001/10/xml-exc-c14n#\" PrefixList=\"\"/></ds:Transform></ds:Transforms><ds:DigestMethod Algorithm=\"http://www.w3.org/2001/04/xmlenc#sha256\"/><ds:DigestValue>fZ2pJ3o/caZOS6Q+KciKYRl0ABoFfCN7nH3h2Gy3kys=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue></ds:SignatureValue><ds:KeyInfo Id=\"KI-C2457C93F643278DC9156537520773342\"><wsse:SecurityTokenReference wsu:Id=\"STR-C2457C93F643278DC9156537520773343\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"><wsse:Reference URI=\"#X509-C2457C93F643278DC9156537520773341\" ValueType=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3\"/></wsse:SecurityTokenReference></ds:KeyInfo></ds:Signature></wsse:Security></soap:Header><soap:Body xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" wsu:Id=\"id-C2457C93F643278DC9156537520773444\"><requestMessage xmlns=\"urn:schemas-cybersource-com:transaction-data-1.150\"><merchantID xmlns=\"urn:schemas-cybersource-com:transaction-data-1.150\">pedidosya</merchantID><merchantReferenceCode>pedidosya</merchantReferenceCode><clientLibrary xmlns=\"urn:schemas-cybersource-com:transaction-data-1.150\">Java XML</clientLibrary><clientLibraryVersion xmlns=\"urn:schemas-cybersource-com:transaction-data-1.150\">6.2.6</clientLibraryVersion><clientEnvironment xmlns=\"urn:schemas-cybersource-com:transaction-data-1.150\">Linux/4.15.0-55-generic/Azul Systems, Inc./1.8.0_201</clientEnvironment><customerID>10454809</customerID><billTo><firstName>Gene CO</firstName><lastName>Colombia</lastName><street1>Calle 3</street1><city>Bogot\\u00E1</city><country>CO</country><email>geneco@mail.com</email></billTo><item id=\"0\"><unitPrice>15900</unitPrice><quantity>3</quantity><productName>Combo Hamburguesa Súper Papas Pequeñas Gaseosa 300 ml</productName><totalAmount>47700</totalAmount><productDescription>1 Hamburguesa súper con queso americano, cebolla, tomate, lechuga, salsa presto, salsa de tomate y tocineta 1 papas pequeñas 1 coca cola de 300 ml.</productDescription></item><item id=\"1\"><unitPrice>9900</unitPrice><quantity>3</quantity><productName>Hamburguesa Súper con Queso</productName><totalAmount>29700</totalAmount><productDescription>Hamburguesa súper con queso Papas y gaseosa pequeñas.</productDescription></item><item id=\"2\"><unitPrice>19400</unitPrice><quantity>1</quantity><productName>Hamburguesa La Poderosa Domicilio</productName><totalAmount>19400</totalAmount><productDescription>Hamburguesa edición limitada La Poderosa BBQ (Pan tipo brioche, deliciosa carne artesanal, queso americano, cerdo desmechado (Pulled Pork), salsa Presto y salsa BBQ.</productDescription></item><purchaseTotals><currency>USD</currency><grandTotalAmount>106480.00</grandTotalAmount></purchaseTotals><card><accountNumber>4111111111111111</accountNumber><expirationMonth>2</expirationMonth><expirationYear>2020</expirationYear><cvNumber>111</cvNumber></card><merchantDefinedData><mddField id=\"1\">27065182</mddField><mddField id=\"2\">No especificada</mddField><mddField id=\"3\"/><mddField id=\"4\">53</mddField><mddField id=\"5\">27</mddField><mddField id=\"6\">4.61532</mddField><mddField id=\"7\">-74.1152</mddField><mddField id=\"8\">09524334353</mddField><mddField id=\"9\"/><mddField id=\"10\">0</mddField><mddField id=\"11\">0</mddField><mddField id=\"12\"/><mddField id=\"13\"/><mddField id=\"14\"/><mddField id=\"15\"/><mddField id=\"16\">09524334353</mddField><mddField id=\"17\">0</mddField><mddField id=\"18\">1559654197000</mddField><mddField id=\"19\">5</mddField><mddField id=\"20\"/><mddField id=\"21\"/><mddField id=\"22\">411111</mddField><mddField id=\"23\">APRO</mddField><mddField id=\"24\">1111</mddField><mddField id=\"25\">YWTdQJG5Of96WassAlnUpJkVMKz</mddField><mddField id=\"26\">VISA</mddField><mddField id=\"27\">CREDIT</mddField><mddField id=\"28\">1560985107000</mddField><mddField id=\"29\">112</mddField><mddField id=\"30\"/><mddField id=\"31\">false</mddField><mddField id=\"32\">WEB</mddField><mddField id=\"33\">2.9.91</mddField><mddField id=\"34\">1563915258000</mddField><mddField id=\"35\">9680.00</mddField><mddField id=\"36\"/><mddField id=\"37\">96800.00</mddField><mddField id=\"38\">524-232037-582c8dbd-ef29-42de-4270-b7d4a8d594d4</mddField><mddField id=\"39\">93490</mddField><mddField id=\"40\">Presto Morato</mddField><mddField id=\"41\">6550550</mddField><mddField id=\"42\">0</mddField><mddField id=\"43\">1447178110000</mddField><mddField id=\"44\">RESTAURANT</mddField><mddField id=\"45\"/><mddField id=\"46\"/><mddField id=\"47\"/><mddField id=\"48\"/><mddField id=\"49\">CALLE 112 N0 70 B 23 - CASA</mddField><mddField id=\"50\"/><mddField id=\"51\"/><mddField id=\"52\"/><mddField id=\"53\">No especificada</mddField><mddField id=\"54\">Bogot\\u00E1</mddField><mddField id=\"55\"/><mddField id=\"56\"/><mddField id=\"57\">556</mddField><mddField id=\"58\">ANA TEST</mddField><mddField id=\"59\">0</mddField><mddField id=\"60\">FRAYCO SAS</mddField><mddField id=\"61\">830101778-6</mddField><mddField id=\"62\"/><mddField id=\"63\">eforero@frayco.com.co,carlosr@frayco.com.co,jordonez@frayco.com.co,aux_tesoreria@frayco.com.co,lmontana@frayco.com.co</mddField><mddField id=\"64\"/><mddField id=\"65\"/></merchantDefinedData><ccAuthService run=\"false\"/><afsService run=\"true\"/></requestMessage></soap:Body></soap:Envelope>{{/xml_dsig}}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment