Gateway - Procesamiento
Tokenización
5 min
procesamiento con wallet o tarjeta tokenizada sequencediagram participant sistema participant mobbex sistema >>mobbex crear operacion note right of mobbex utilizar private key sistema >>mobbex generar cobro note right of mobbex utilizar public key generar un nuevo checkout desde el lado servidor utilizando llave privada obtener desde el objeto wallet it ( intent token ) y wallet installments reference procesar la operación como en el punto 4 se debe enviar securitycode como parametro adicional en body { "tab" "examples", "url" "https //api sugaway com/p/operations/{{intent token}}", "name" "procesamiento con wallet", "method" "post", "request" { "pathparameters" \[], "queryparameters" \[], "headerparameters" \[], "bodydataparameters" \[ { "kind" "required", "name" "installment", "type" "string", "description" "reference obtenido desde las cuotas calculadas para la tarjeta elegida en wallet " }, { "kind" "optional", "name" "securitycode", "type" "string", "description" "código de seguridad de la tarjeta elegida " } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "izcm6v04reu9totmggcpa", "code" "{\n \\"id\\" \\"ks6d18und\\",\n \\"status\\" {\n \\"code\\" \\"200\\",\n \\"text\\" \\"aprobado\\",\n \\"message\\" \\"transacción aprobada\\"\n }\n}", "language" "200" } ], "selectedlanguageid" "izcm6v04reu9totmggcpa" }, "examples" { "languages" \[ { "id" "bsl0hgxn8kcuz8 fprh5j", "language" "curl", "code" "curl location g request post 'https //api sugaway com/p/operations/{{intent token}}' \\\\\n header 'accept application/json' \\\\\n data raw '{\\"installment\\" \\"string\\",\\"securitycode\\" \\"string\\"}'", "customlabel" "" }, { "id" "xpvv4xdwocvxlslq0hsev", "language" "nodejs", "code" "var request = require('request');\nvar options = {\n 'method' 'post',\n 'url' 'https //api sugaway com/p/operations/{{intent token}}',\n 'headers' {\n 'accept' 'application/json'\n },\n body '{\\"installment\\" \\"string\\",\\"securitycode\\" \\"string\\"}'\n\n};\nrequest(options, function (error, response) {\n if (error) throw new error(error);\n console log(response body);\n});\n", "customlabel" "" }, { "id" "lmyyoygfoc550c05axk66", "language" "javascript", "code" "var myheaders = new headers();\nmyheaders append(\\"accept\\", \\"application/json\\");\n\nvar raw = \\"{\\\\\\"installment\\\\\\" \\\\\\"string\\\\\\",\\\\\\"securitycode\\\\\\" \\\\\\"string\\\\\\"}\\";\n\nvar requestoptions = {\n method 'post',\n headers myheaders,\n body raw,\n redirect 'follow'\n};\n\nfetch(\\"https //api sugaway com/p/operations/{{intent token}}\\", requestoptions)\n then(response => response text())\n then(result => console log(result))\n catch(error => console log('error', error));", "customlabel" "" }, { "id" "oidquqhhhdnjdujqepaou", "language" "python", "code" "import requests\n\nurl = \\"https //api sugaway com/p/operations/{{intent token}}\\"\n\npayload = \\"{\\\\\\"installment\\\\\\" \\\\\\"string\\\\\\",\\\\\\"securitycode\\\\\\" \\\\\\"string\\\\\\"}\\"\nheaders = {\n 'accept' 'application/json'\n}\n\nresponse = requests request(\\"post\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "hz3gwa97wukc9eqr3nsmm", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //api sugaway com/p/operations/{{intent token}}\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http post new(url)\nrequest\[\\"accept\\"] = \\"application/json\\"\nrequest body = \\"{\\\\\\"installment\\\\\\" \\\\\\"string\\\\\\",\\\\\\"securitycode\\\\\\" \\\\\\"string\\\\\\"}\\"\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" } ], "selectedlanguageid" "bsl0hgxn8kcuz8 fprh5j" }, "description" "permite procesar una tarjeta previamente guardada ", "currentnewparameter" { "label" "body parameter", "value" "bodydataparameters" } } códigos de respuesta ver https //www sugaway dev/codigos de estado uso del sdk para javascript importante tenga en cuenta que integrity ( sri ) es obligatorio, de lo contrario sus credenciales pueden ser canceladas mobbex sdk 	 you need to enable javascript to run this app 		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 pagar