{"__v":31,"_id":"5732561facf61f0e003976a0","category":{"__v":0,"_id":"573255c0384fc70e0050ea42","project":"573243608b55962900f063c0","version":"573243608b55962900f063c1","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-10T21:42:24.258Z","from_sync":false,"order":5,"slug":"status","title":"Status Request"},"parentDoc":null,"project":"573243608b55962900f063c0","user":"5716534c893cbe0e002d7647","version":{"__v":9,"_id":"573243608b55962900f063c1","project":"573243608b55962900f063c0","createdAt":"2016-04-19T15:51:35.494Z","releaseDate":"2016-04-19T15:51:35.494Z","categories":["573243608b55962900f063c3","573243608b55962900f063c2","573255b9ee92510e00087821","573255c0384fc70e0050ea42","573255ce9ef0fa0e0083f0d4","57334604b90dba1900b3d90c","5733474f45fc0c0e00c154da","57348e6e6a42521700a246fb","57348e79a210200e005f99e2","5734efd57e13fd17002f1129","5746204e04f2410e00a5a2e4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-10T21:43:59.012Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Endpoints\",\n  \"body\": \"Production Environment\\nhttps://mws2.safetypay.com/express/ws/v.3.0/Post/GetOperation\\n\\nSandbox Environment\\nhttps://sandbox-mws2.safetypay.com/express/ws/v.3.0/Post/GetOperation\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"GetOperation\"\n}\n[/block]\nYou can retrieve all operation activity for a specific operation using this POST method.\n\n**REQUEST**\n\n**Request Fields**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Values\",\n    \"0-0\": \"ApiKey\",\n    \"1-0\": \"RequestDateTime\",\n    \"2-0\": \"MerchantSalesID\",\n    \"3-0\": \"Signature\",\n    \"4-0\": \"ResponseFormat\",\n    \"0-1\": \"Api Key generades by the merchant in the MMS.\",\n    \"1-1\": \"Merchant's Date and Time. \\nUsed to compose the signature.\",\n    \"2-1\": \"Reference Number of the merchant’s sale.\",\n    \"3-1\": \"HASH SHA256 de:\\nRequestDateTime + \\nMerchantSalesID + \\nSignatureKey\",\n    \"4-1\": \"Response format.\\nOPCIONAL\",\n    \"0-2\": \"String (32)\",\n    \"1-2\": \"Datetime\",\n    \"2-2\": \"String (50)\",\n    \"3-2\": \"String (64)\",\n    \"4-2\": \"String (3)\",\n    \"0-3\": \"Example:\\n23f1d7e1b2d44b7fb43e4bcddee45689\",\n    \"1-3\": \"ISO 8601: yyyy-MM-ddThh:mm:ss\\nExample: 2007-01-31T14:24:59\",\n    \"2-3\": \"Example: \\nORD-10001,\\nRXW-P03-V01,\\n001-012312220, etc.\",\n    \"4-3\": \"“CSV” or “XML”\\nDEFAULT “CSV”\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n**Request - Example** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Get Operation\\n    $Result = $proxy->GetOperation();\\n    if ( $Result['ErrorManager']['ErrorNumber'][':::at:::content'] == '0' )\\n        $errorNo = '<span style=\\\"color:black;\\\">'\\n            . current(@@$Result['ErrorManager']['ErrorNumber']) . ', '\\n            . current(@@$Result['ErrorManager']['Description']) . '. Severity: '\\n            . current(@@$Result['ErrorManager']['Severity']) . '</span>';\\n    else\\n        if (is_array($Result['ErrorManager']['ErrorNumber']))\\n            $errorNo = '<span style=\\\"color:red;\\\">'\\n                . current(@@$Result['ErrorManager']['ErrorNumber']) . ', '\\n                . current(@@$Result['ErrorManager']['Description']) . '. Severity: '\\n                . current(@@$Result['ErrorManager']['Severity']) . '</span>';\\n        else\\n            $errorNo = '<span style=\\\"color:red;\\\">'\\n                . @@$Result['ErrorManager']['ErrorNumber'] . ', '\\n                . @@$Result['ErrorManager']['Description'] . '. Severity: '\\n                . @@$Result['ErrorManager']['Severity'] . '</span>';\\n}\\n?>\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n**RESPONSE**\n\n**Response Fields**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Values\",\n    \"0-0\": \"ResponseDateTime\",\n    \"1-0\": \"ListOfOperations\",\n    \"2-0\": \"Signature\",\n    \"3-0\": \"ErrorManager\",\n    \"0-1\": \"SAFETYPAY's date and time (GMT).\\nUsed to compose the signature.\",\n    \"1-1\": \"OperacionType list\",\n    \"2-1\": \"HASH SHA256:\\nResponseDateTime +\\nListOfOperations[n].OperationID + \\nListOfOperations[n].MerchantSalesID + \\nListOfOperations[n].OperationActivities[n]. CreationDateTime + \\nListOfOperations[n].OperationActivities[n].Status.StatusCode + \\nSignatureKey\",\n    \"3-1\": \"Error asociated to the operation\",\n    \"0-2\": \"Datetime\",\n    \"2-2\": \"String (64)\",\n    \"1-2\": \"ListOfOperationsType\",\n    \"3-2\": \"ErrorManagerType\",\n    \"0-3\": \"ISO 8601: \\nyyyy-MM-ddThh:mm:ss\\n\\nExample: \\n2007-01-31T14:24:59\",\n    \"1-3\": \"See definition of OperationType.\",\n    \"2-3\": \"See definition of ErrorManagerType\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n**Operation Type**\n\n**OperationType Fields** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Values\",\n    \"0-0\": \"CreationDateTime\",\n    \"1-0\": \"OperationID\",\n    \"2-0\": \"MerchantSalesID\",\n    \"3-0\": \"MerchantOrderID\",\n    \"4-0\": \"Amount\",\n    \"5-0\": \"CurrencyID\",\n    \"6-0\": \"ShopperAmount\",\n    \"7-0\": \"ShopperCurrencyID\",\n    \"8-0\": \"AuthorizationCode\",\n    \"9-0\": \"OperationActivities\",\n    \"10-0\": \"PaymentReferenceNo\",\n    \"0-1\": \"SafetyPay format of Date and Time based in GMT.\",\n    \"1-1\": \"Unique ID for a SafetyPay Operation.\",\n    \"2-1\": \"Reference Number of the merchant’s sale. Transmitted by the merchant when using the operation CreateExpressToken.\\nChar(20)\",\n    \"3-1\": \"Used by the merchant when using the operation ConfirmNewOperationActivity.\\n\\nIt can be the same or different than the MerchantSalesID \\n\\nIMPORTANT: \\nInclude this element in the ConfirmNewOperationActivity.\\nIt will be used for reports.\",\n    \"4-1\": \"Transaction amount in the merchant’s currency.\",\n    \"5-1\": \"Transaction amount in the merchant’s currency.\",\n    \"6-1\": \"Transaction amount in the buyer’s currency.\",\n    \"7-1\": \"Currency Code related to the ShopperAmount\",\n    \"8-1\": \"This code is composed of AuthorizationCode+ExpirationDate+ConfirmationCode\\n\\nAuthorizationCode: Confirmation code for the approval of a transaction generated for SafetyPay.\\n\\nExpirationDate: Month and Year in which the ConfirmationCode expires.\\n\\nConfirmationCode Confirmation Code generated by SafetyPay, by the merchant and/or by a Partner for each transaction (The Authorization code and Confirmation Code combination must be unique).\\nOPTIONAL\",\n    \"9-1\": \"Operation Activities list.\",\n    \"10-1\": \"Reference number of the payment operation. Maximum: 20 characters\\nOPTIONAL\",\n    \"0-2\": \"Datetime\",\n    \"1-2\": \"String (16)\",\n    \"2-2\": \"String (50)\",\n    \"3-2\": \"String (20)\",\n    \"4-2\": \"Decimal\",\n    \"5-2\": \"String (3)\",\n    \"6-2\": \"Decimal\",\n    \"7-2\": \"String (3)\",\n    \"8-2\": \"String\",\n    \"9-2\": \"ListOfOperationActivitiesType\",\n    \"10-2\": \"xs:string\",\n    \"0-3\": \"ISO 8601: \\nyyyy-MM-ddThh:mm:ss\\n\\nExample: \\n2007-01-31T14:24:59\",\n    \"1-3\": \"Example: 0149929001929301\",\n    \"2-3\": \"Example: \\nORD-10001,\\nRXW-P03-V01,\\n001-012312220, etc.\",\n    \"3-3\": \"Example: \\nORD-10001,\\nRXW-P03-V01,\\n001-012312220, etc.\",\n    \"4-3\": \"Example: 100.00\",\n    \"5-3\": \"ISO-4217\\n\\nExample: \\nUSD, EUR, MXN, etc\",\n    \"6-3\": \"Example:100.00\",\n    \"7-3\": \"ISO-4217\\n\\nExample: \\nUSD, EUR, MXN, etc.\",\n    \"8-3\": \"Example: 455103812161240701124587\",\n    \"10-3\": \"Example: 2001258\"\n  },\n  \"cols\": 4,\n  \"rows\": 11\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"The fields MerchantSalesID and AuthorizationCode are send in the response of the method GetOperation.\",\n  \"title\": \"Note:\"\n}\n[/block]\n**OperationActivity**\n\n**OperationActivity Fields** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Values\",\n    \"0-0\": \"CreationDateTime\",\n    \"1-0\": \"Status\",\n    \"0-2\": \"Datetime\",\n    \"1-2\": \"StatusType\",\n    \"0-3\": \"ISO 8601: \\nyyyy-MM-ddThh:mm:ss\\n\\nExample: \\n2007-01-31T14:24:59\",\n    \"1-3\": \"\",\n    \"0-1\": \"SafetyPay format of Date and Time based in GMT and the ISO 8601\",\n    \"1-1\": \"StatusType\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n**StatusType**\n\n**StatusType Fields** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"type\",\n    \"h-3\": \"Values\",\n    \"0-0\": \"StatusCode\",\n    \"1-0\": \"Description\",\n    \"0-1\": \"Status Code\",\n    \"1-1\": \"Description\",\n    \"0-2\": \"String (3)\",\n    \"1-2\": \"String (50)\",\n    \"0-3\": \"Example: 100,101,102\",\n    \"1-3\": \"Example: Transaction Paid.\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n**Response - Example**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"0,2016-05-19T20:00:00,B3D9DE89DFD62D53CE67AD97D42AD449D7394BB52EDEEA8C43586A4C628086B8,2015-10-23T15:30:58,0115296702797757,TestSafetyPay,,100.0000,PEN,100.0000,PEN,,,2015-10-30T15:40:48,100,Transaction Expired \\n0,2016-05-19T20:00:00,B3D9DE89DFD62D53CE67AD97D42AD449D7394BB52EDEEA8C43586A4C628086B8,2015-10-23T15:30:58,0115296702797757,TestSafetyPay,,100.0000,PEN,100.0000,PEN,,,2015-10-23T15:30:58,101,Purchase Pending\",\n      \"language\": \"text\",\n      \"name\": \"CSV\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"nvp","type":"basic","title":"Integrating with NVP"}

Integrating with NVP


[block:callout] { "type": "info", "title": "Endpoints", "body": "Production Environment\nhttps://mws2.safetypay.com/express/ws/v.3.0/Post/GetOperation\n\nSandbox Environment\nhttps://sandbox-mws2.safetypay.com/express/ws/v.3.0/Post/GetOperation" } [/block] [block:api-header] { "type": "basic", "title": "GetOperation" } [/block] You can retrieve all operation activity for a specific operation using this POST method. **REQUEST** **Request Fields** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Type", "h-3": "Values", "0-0": "ApiKey", "1-0": "RequestDateTime", "2-0": "MerchantSalesID", "3-0": "Signature", "4-0": "ResponseFormat", "0-1": "Api Key generades by the merchant in the MMS.", "1-1": "Merchant's Date and Time. \nUsed to compose the signature.", "2-1": "Reference Number of the merchant’s sale.", "3-1": "HASH SHA256 de:\nRequestDateTime + \nMerchantSalesID + \nSignatureKey", "4-1": "Response format.\nOPCIONAL", "0-2": "String (32)", "1-2": "Datetime", "2-2": "String (50)", "3-2": "String (64)", "4-2": "String (3)", "0-3": "Example:\n23f1d7e1b2d44b7fb43e4bcddee45689", "1-3": "ISO 8601: yyyy-MM-ddThh:mm:ss\nExample: 2007-01-31T14:24:59", "2-3": "Example: \nORD-10001,\nRXW-P03-V01,\n001-012312220, etc.", "4-3": "“CSV” or “XML”\nDEFAULT “CSV”" }, "cols": 4, "rows": 5 } [/block] **Request - Example** [block:code] { "codes": [ { "code": "// Get Operation\n $Result = $proxy->GetOperation();\n if ( $Result['ErrorManager']['ErrorNumber']['@content'] == '0' )\n $errorNo = '<span style=\"color:black;\">'\n . current(@@$Result['ErrorManager']['ErrorNumber']) . ', '\n . current(@@$Result['ErrorManager']['Description']) . '. Severity: '\n . current(@@$Result['ErrorManager']['Severity']) . '</span>';\n else\n if (is_array($Result['ErrorManager']['ErrorNumber']))\n $errorNo = '<span style=\"color:red;\">'\n . current(@@$Result['ErrorManager']['ErrorNumber']) . ', '\n . current(@@$Result['ErrorManager']['Description']) . '. Severity: '\n . current(@@$Result['ErrorManager']['Severity']) . '</span>';\n else\n $errorNo = '<span style=\"color:red;\">'\n . @@$Result['ErrorManager']['ErrorNumber'] . ', '\n . @@$Result['ErrorManager']['Description'] . '. Severity: '\n . @@$Result['ErrorManager']['Severity'] . '</span>';\n}\n?>", "language": "php" } ] } [/block] **RESPONSE** **Response Fields** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Type", "h-3": "Values", "0-0": "ResponseDateTime", "1-0": "ListOfOperations", "2-0": "Signature", "3-0": "ErrorManager", "0-1": "SAFETYPAY's date and time (GMT).\nUsed to compose the signature.", "1-1": "OperacionType list", "2-1": "HASH SHA256:\nResponseDateTime +\nListOfOperations[n].OperationID + \nListOfOperations[n].MerchantSalesID + \nListOfOperations[n].OperationActivities[n]. CreationDateTime + \nListOfOperations[n].OperationActivities[n].Status.StatusCode + \nSignatureKey", "3-1": "Error asociated to the operation", "0-2": "Datetime", "2-2": "String (64)", "1-2": "ListOfOperationsType", "3-2": "ErrorManagerType", "0-3": "ISO 8601: \nyyyy-MM-ddThh:mm:ss\n\nExample: \n2007-01-31T14:24:59", "1-3": "See definition of OperationType.", "2-3": "See definition of ErrorManagerType" }, "cols": 4, "rows": 4 } [/block] **Operation Type** **OperationType Fields** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Type", "h-3": "Values", "0-0": "CreationDateTime", "1-0": "OperationID", "2-0": "MerchantSalesID", "3-0": "MerchantOrderID", "4-0": "Amount", "5-0": "CurrencyID", "6-0": "ShopperAmount", "7-0": "ShopperCurrencyID", "8-0": "AuthorizationCode", "9-0": "OperationActivities", "10-0": "PaymentReferenceNo", "0-1": "SafetyPay format of Date and Time based in GMT.", "1-1": "Unique ID for a SafetyPay Operation.", "2-1": "Reference Number of the merchant’s sale. Transmitted by the merchant when using the operation CreateExpressToken.\nChar(20)", "3-1": "Used by the merchant when using the operation ConfirmNewOperationActivity.\n\nIt can be the same or different than the MerchantSalesID \n\nIMPORTANT: \nInclude this element in the ConfirmNewOperationActivity.\nIt will be used for reports.", "4-1": "Transaction amount in the merchant’s currency.", "5-1": "Transaction amount in the merchant’s currency.", "6-1": "Transaction amount in the buyer’s currency.", "7-1": "Currency Code related to the ShopperAmount", "8-1": "This code is composed of AuthorizationCode+ExpirationDate+ConfirmationCode\n\nAuthorizationCode: Confirmation code for the approval of a transaction generated for SafetyPay.\n\nExpirationDate: Month and Year in which the ConfirmationCode expires.\n\nConfirmationCode Confirmation Code generated by SafetyPay, by the merchant and/or by a Partner for each transaction (The Authorization code and Confirmation Code combination must be unique).\nOPTIONAL", "9-1": "Operation Activities list.", "10-1": "Reference number of the payment operation. Maximum: 20 characters\nOPTIONAL", "0-2": "Datetime", "1-2": "String (16)", "2-2": "String (50)", "3-2": "String (20)", "4-2": "Decimal", "5-2": "String (3)", "6-2": "Decimal", "7-2": "String (3)", "8-2": "String", "9-2": "ListOfOperationActivitiesType", "10-2": "xs:string", "0-3": "ISO 8601: \nyyyy-MM-ddThh:mm:ss\n\nExample: \n2007-01-31T14:24:59", "1-3": "Example: 0149929001929301", "2-3": "Example: \nORD-10001,\nRXW-P03-V01,\n001-012312220, etc.", "3-3": "Example: \nORD-10001,\nRXW-P03-V01,\n001-012312220, etc.", "4-3": "Example: 100.00", "5-3": "ISO-4217\n\nExample: \nUSD, EUR, MXN, etc", "6-3": "Example:100.00", "7-3": "ISO-4217\n\nExample: \nUSD, EUR, MXN, etc.", "8-3": "Example: 455103812161240701124587", "10-3": "Example: 2001258" }, "cols": 4, "rows": 11 } [/block] [block:callout] { "type": "warning", "body": "The fields MerchantSalesID and AuthorizationCode are send in the response of the method GetOperation.", "title": "Note:" } [/block] **OperationActivity** **OperationActivity Fields** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "Type", "h-3": "Values", "0-0": "CreationDateTime", "1-0": "Status", "0-2": "Datetime", "1-2": "StatusType", "0-3": "ISO 8601: \nyyyy-MM-ddThh:mm:ss\n\nExample: \n2007-01-31T14:24:59", "1-3": "", "0-1": "SafetyPay format of Date and Time based in GMT and the ISO 8601", "1-1": "StatusType" }, "cols": 4, "rows": 2 } [/block] **StatusType** **StatusType Fields** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "h-2": "type", "h-3": "Values", "0-0": "StatusCode", "1-0": "Description", "0-1": "Status Code", "1-1": "Description", "0-2": "String (3)", "1-2": "String (50)", "0-3": "Example: 100,101,102", "1-3": "Example: Transaction Paid." }, "cols": 4, "rows": 2 } [/block] **Response - Example** [block:code] { "codes": [ { "code": "0,2016-05-19T20:00:00,B3D9DE89DFD62D53CE67AD97D42AD449D7394BB52EDEEA8C43586A4C628086B8,2015-10-23T15:30:58,0115296702797757,TestSafetyPay,,100.0000,PEN,100.0000,PEN,,,2015-10-30T15:40:48,100,Transaction Expired \n0,2016-05-19T20:00:00,B3D9DE89DFD62D53CE67AD97D42AD449D7394BB52EDEEA8C43586A4C628086B8,2015-10-23T15:30:58,0115296702797757,TestSafetyPay,,100.0000,PEN,100.0000,PEN,,,2015-10-23T15:30:58,101,Purchase Pending", "language": "text", "name": "CSV" } ] } [/block]