### Authorize Transaction (Example Structure) Source: https://context7_llms Provides an example of a signed package structure for transaction authorization, detailing the fields and their purpose. ```APIDOC ## POST /SecurePaymentGateway.svc/Key/ (for signing example) ### Description Example of a signed package structure for transaction authorization, including fields like Fingerprint, Object, and UTCUnixTimeExpiration, which are used to create the Signature. ### Method POST (Implicit for signing process example) ### Endpoint `https://testing.plexo.com.uy:4043/SecurePaymentGateway.svc/Key/` (URL mentioned in context of obtaining key, but structure shown is for signed payload) ### Parameters #### Request Body (Signed Payload Structure) - **Object** (integer) - Likely an internal identifier or version, example shows `(1)`. - **Fingerprint** (string) - Identifier of the PFX key used for signing. Example: `"8D3225D6A04C8A5EB8D69139A3389E0619C6D292"`. - **Object** (integer) - Internal identifier, example shows `(2)`. - **Client** (string) - Client name. Example: `"PlexoTest"`. - **Request** (object) - Request payload. - **Action** (integer) - Action code. Example: `35`. - **ClientInformation** (object) - Client details. - **Name** (string) - Client's name. Example: `"Francisco Vidal"`. - **Address** (string) - Client's address. Example: `"Av Italia 2020"`. - **Email** (string) - Client's email. Example: `"fvidal@plexo.com.uy"`. - **Cellphone** (string) - Client's cellphone. Example: `"099999999"`. - **Identification** (string) - Client's identification number. Example: `"12345567"`. - **IdentificationType** (string) - Type of identification. Example: `"1"`. - **DoNotUseCallback** (boolean) - Callback usage flag. Example: `false`. - **LimitIssuers** (array) - List of issuers. Example: `["4","4_1","11","15"]`. - **MetaReference** (string) - Meta-reference. Example: `"fvidal@plexo.com.uy"`. - **OptionalMetadata** (string) - Optional metadata. Example: `"Socio #17826"`. - **RedirectUri** (string) - Redirect URI. Example: `"http://plexo.com.uy/callback/redirect"`. - **Type** (integer) - Request type. Example: `0`. - **UTCUnixTimeExpiration** (long) - Expiration time of the signature. Example: `1532094228935`. - **Signature** (string) - The signature of the canonicalized data. Example: `"iUxW9w...WA="`. ### Request Example ```json { "Object": (1) { "Fingerprint":"8D3225D6A04C8A5EB8D69139A3389E0619C6D292", "Object": (2) { "Client":"PlexoTest", "Request": { "Action":35, "ClientInformation": { "Name":"Francisco Vidal", "Address":"Av Italia 2020", "Email":"fvidal@plexo.com.uy", "Cellphone":"099999999", "Identification":"12345567", "IdentificationType":"1" }, "DoNotUseCallback":false, "LimitIssuers":["4","4_1","11","15"], "MetaReference":"fvidal@plexo.com.uy", "OptionalMetadata":"Socio #17826", "RedirectUri":"http://plexo.com.uy/callback/redirect", "Type":0 } }, "UTCUnixTimeExpiration":1532094228935 }, "Signature":"iUxW9w...WA=" } ``` ### Response #### Success Response (200) (Response details for this specific signing structure example are not detailed in the source text, but would typically confirm the validity of the signed data.) #### Response Example (Example response structure not provided in the source text) ``` -------------------------------- ### Implement a Basic Promise Source: https://drive.google.com/file/d/1gcwiAs-NEfbue8eRLKzTZZR7V2bVXA2x/view A simplified implementation of a Promise, demonstrating the core concepts of asynchronous operation resolution and rejection handling with basic `then` and `catch` like functionality. ```javascript z("Promise",function(a){function b(){this.i=null}function c(g){return g instanceof e?g:new e(function(h){h(g)})}if(a)return a;b.prototype.j=function(g){if(this.i==null){this.i=[];var h=this;this.o(function(){h.A()})}this.i.push(g)};var d=Mb.setTimeout;b.prototype.o=function(g){d(g,0)};b.prototype.A=function(){for(;this.i&&this.i.length;){var g=this.i;this.i=[];for(var h=0;h Items { get; set; } public PaymentInstrumentInput PaymentInstrumentInput { get; set; } // ... otros campos ... } public class Item { public int Quantity { get; set; } public string Name { get; set; } public string Description { get; set; } } public class PaymentInstrumentInput { public string InstrumentToken { get; set; } // Puede obviarse si no hay token // ... otros campos ... } // Para limitar bancos en débito bancario: // public List LimitIssuers { get; set; } // Ejemplo: new List { 52, 54 } para Itau y Santander // Para desactivar validación 3DS: // public bool Disable3DS { get; set; } = true; // Para pagos asincrónicos, se puede configurar el tiempo de expiración: // public int CommerceReserveExpirationInSeconds { get; set; } // Ej: 1800 para 30 minutos ``` -------------------------------- ### Get Public Key for Package Signing Source: https://context7_llms Retrieve the public key used by Plexo to sign incoming packages. This key is essential for verifying the integrity of signed data. ```APIDOC ## GET /Key/ ### Description Retrieves the public key used by Plexo to sign incoming packages. ### Method GET ### Endpoint `https://testing.plexo.com.uy:4043/SecurePaymentGateway.svc/Key/` ### Parameters None ### Request Example None ### Response #### Success Response (200) - **PublicKey** (string) - The public key for package verification. #### Response Example (Example response structure not provided in the source text) ``` -------------------------------- ### Get Browser User Agent String Source: https://drive.google.com/file/d/1gcwiAs-NEfbue8eRLKzTZZR7V2bVXA2x/view Retrieves the user agent string from the browser's navigator object. This string provides information about the browser, operating system, and device. ```javascript _.ka=function(){var a=_.t.navigator;return a&&(a=a.userAgent)?a:""}; ``` -------------------------------- ### Realizar Devolución Parcial (Refundv2) Source: https://context7_llms Permite realizar una o más devoluciones parciales del monto original de una compra. Se utiliza un POST a la operación Refundv2. Requiere un objeto RefundRequest con detalles de la transacción y el monto a devolver. ```json { "ReferenceType": "PlexoReference | ClientReference", "ClientReferenceId": "string", "MetaReference": "string", "Amount": "decimal" } ``` -------------------------------- ### String Prefix Check (JavaScript) Source: https://drive.google.com/file/d/1gcwiAs-NEfbue8eRLKzTZZR7V2bVXA2x/view Implements a function `Ee` to check if a string `a` starts with another string `b`. This is a fundamental string manipulation utility used in various parsing and validation scenarios. ```javascript _.Ee = function(a, b) { return a.lastIndexOf(b, 0) == 0 }; ``` -------------------------------- ### Disposable Objects and Event Handling Source: https://drive.google.com/file/d/1btIGIeglWsRRNZLghTHLY0XOLS7Fjjsa/view Implements a base class `_.$S` for disposable objects with `dispose` and `P` (process/cleanup) methods. Also includes `Bd` for managing callback queues and `Cd` for handling browser events, crucial for managing LLM session lifecycles. ```javascript \_.S=function(){this.Aa=this.Aa;this.Y=this.Y};\_.S.prototype.Aa=!1;\_.S.prototype.isDisposed=function(){return this.Aa};\_.S.prototype.dispose=function(){this.Aa||(this.Aa=!0,this.P())};\_.S.prototype[Symbol.dispose]=function(){this.dispose()};\_.S.prototype.P=function(){if(this.Y)for(var a=this.Y.length,b=this.Y,c=[],d=0;d=0&&a.indexOf("Trident")>=0&&(a=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a))&&a[1]&&parseFloat(a[1])<9&&(this.j=!0)};\_.B(Cd,\_.S);Cd.prototype.C=function(a,b){this.i=b;this.A=a;b.preventDefault?b.preventDefault():b.returnValue=!1} ``` -------------------------------- ### Get First Element Matching Selector (JavaScript) Source: https://drive.google.com/file/d/1gcwiAs-NEfbue8eRLKzTZZR7V2bVXA2x/view Retrieves the first DOM element that matches a given CSS selector. It handles both class names and general selectors, returning the element or null if not found. ```javascript _.V = function(a, b) { var c = b || document; a = a ? (b || c).querySelector(a ? "." + a : "") : _.Ze(c, "*", a, b)[0] || null; return a || null }; ``` -------------------------------- ### Object Definition and Freezing Source: https://drive.google.com/file/d/1btIGIeglWsRRNZLghTHLY0XOLS7Fjjsa/view Demonstrates defining properties on objects using `Object.defineProperties` and freezing objects using `Object.freeze`. This is useful for creating immutable configurations or data structures required by LLM APIs. ```javascript var Fa,Ea,kd;Fa={Xj:{value:0,configurable:!0,writable:!0,enumerable:!1}};Ea=Object.defineProperties;\_.v=_.Da?fd:"Xj";kd=\[\];\_.Ha(kd,7);\_.jd=Object.freeze(kd);var Ia;\_.Za={};Ia={};\_.ld=Object.freeze({}) ``` -------------------------------- ### Initialize Google Drive Viewer Timing Source: https://drive.google.com/file/d/1gcwiAs-NEfbue8eRLKzTZZR7V2bVXA2x/view Initializes the Google Drive Viewer timing configuration, specifically for 'ogb_hs'. This is typically used for performance monitoring within the Google Drive viewer interface. ```javascript this.gbar_['ogb_hs']=performance.now(); ``` -------------------------------- ### URL Prefix Validation (JavaScript) Source: https://drive.google.com/file/d/1gcwiAs-NEfbue8eRLKzTZZR7V2bVXA2x/view Defines a validator `te` that checks if a given string starts with a specific prefix and is followed by a colon. This is commonly used for validating URL schemes like 'http:', 'https:', etc. ```javascript te = function(a) { return new _.se(function(b) { return b.substr(0, a.length + 1).toLowerCase() === a + ":" }) }; ``` -------------------------------- ### Estructura de datos FinancialInclusion (C#) Source: https://context7_llms Detalla los campos para la Ley de Inclusión Financiera, incluyendo montos, número de factura y tipo de ley aplicable. ```csharp public class FinancialInclusion { public decimal BilledAmount { get; set; } // Monto total de la compra con impuestos public string InvoiceNumbe { get; set; } // Número de factura public decimal TaxedAmount { get; set; } // Monto neto de la venta que lleva impuestos public int Type { get; set; } // Tipo de Ley: 0-No aplica, 1-Ley 17934, 6-Ley 19210 public decimal VATAmount { get; set; } // Monto que corresponde a los impuestos (Opcional) } ``` -------------------------------- ### Get Nonce from Element (JavaScript) Source: https://drive.google.com/file/d/1gcwiAs-NEfbue8eRLKzTZZR7V2bVXA2x/view Retrieves the 'nonce' attribute from a DOM element, typically used for Content Security Policy (CSP) to validate inline scripts. It searches for an element matching the selector and returns its nonce value. ```javascript _.Pe = function(a, b) { b = b === void 0 ? document : b; var c, d; b = (d = (c = b).querySelector) == null ? void 0 : d.call(c, a + "[nonce]"); return b == null ? "" : b.nonce || b.getAttribute("nonce") || "" }; ``` -------------------------------- ### Plexo Authorize - Erroneous Request Example Source: https://context7_llms This JSON snippet demonstrates an incorrect invocation of the Plexo Authorize function. The error indicates a missing 'Action' field within the Request object, which is crucial for correct signature validation. ```json {"Object":{"Fingerprint":"06356B6157EF3AB24D20EBCC5158C75E371D3734","Object":{"Client":"Fvidal","Request":{"ClientInformation":{"Address":"Echevarriarza 3340","ZipCode":"15800","Email":"fvidal@plexo.com.uy","Identification":"42320818","IdentificationType":"1","FirstName":"Leonardo","LastName":"González Mazzei","City":"Montevideo"},"DoNotUseCallback":false,"ExtendedBINInformation":true,"MetaReference":"fvidal@plexo.com.uy","OptionalCommerceId":84,"RedirectUri":"https://google.com.uy/","Type":0}},"UTCUnixTimeExpiration":1703296821},"Signature":"QVwy+V5JD+i01eRzODxlVXSTxHelSn/1gUQ3KVI4fI9Nw7TQ1lcBY4HGORTO0lst2TcK9vSS4FyYlT1KYLEY5uL+8NMVEIgaJeeEGZnKJktqEW0UFvnwEKinIbExnrxh47jrA7M0Daf+gETNAQjdd1Cx0kF+8E3/yjRbnGfldDWMyConJ2vfC+edmncMqmbOVllOa0cMjTrEHaJDwRCYrmAHo+jQa8+Z8MkxajV93YT4CXbhxKoFubkDyNQ36QKwdJGgl8gSfUYPhkWm6UUCcH+lJdfZcOnbfwk75nnkUPTRwTw05c8yfjVTH0DVH2iDRHzoX/spSFyXwD42b3Dr1FHx9+5d3nqhHKzkFLQFxw4qhMOWQho65MkS4ZdEBX9xecsvxPQ67ZqDtTwQ9DFqq5SK6Z5IgHTgFlT0NEbaJYKVLC0GMzRLEcH+JklNxIfgct18HIamf9+Fl0n3UpAj5/+kT2TSAYxf1EloJU83g0Qe0j2K7C6QkGLFj9bZs8+U1QiPR6wWPHjWC3l9GKXlgWHoMvzTgkUP5dI+HshokgKlS5IfUWnJebT/tnSGb9OuLjF+Ixqxsrm3vOwGJnhvnAvuWMz5giH/94DISircd4xhunlIVQTXDeQ//5hTSaWhFcPwHnb5v2xJwqLRPcOu9WwRiIOEfAr+49I189/FHCo="} ``` -------------------------------- ### Ejemplo de Respuesta de Autorización Plexo Source: https://context7_llms Presenta la respuesta recibida de Plexo tras una solicitud de autorización, incluyendo el tiempo de expiración, un identificador único y una URI de redirección. ```json { "ExpirationUTC":1505192898, "Id":"c24cb52e05dd4e6295fbc318e9b52bb2", "Uri":" https://web.testing.plexo.com.uy/c24cb52e05dd4e6295fbc318e9b52bb2", "ResultCode":0 } ``` -------------------------------- ### Configuración de Comercio por Defecto Source: https://context7_llms Realiza un POST a la API para establecer un comercio como predeterminado. Requiere un objeto CommerceIdRequest con el identificador del comercio. Si no se configura uno, OptionalCommerceId debe enviarse siempre. ```HTTP POST /SecurePaymentGateway.svc/Commerce/SetDefault Content-Type: application/json { "CommerceIdRequest": { "commerceId": "ID_DEL_COMERCIO_POR_DEFECTO" } } ``` -------------------------------- ### Plexo Authorize - Corrected Request Example Source: https://context7_llms This JSON snippet shows a corrected invocation of the Plexo Authorize function. It includes the missing 'Action' field with the value '3' (Select + Register), which resolves the signature validation error and ensures proper transaction processing. ```json {"Object":{"Fingerprint":"06356B6157EF3AB24D20EBCC5158C75E371D3734","Object":{"Client":"Fvidal","Request":{"Action":3,"ClientInformation":{"Address":"Echevarriarza 3340","ZipCode":"15800","Email":"fvidal@plexo.com.uy","Identification":"42320818","IdentificationType":"1","FirstName":"Leonardo","LastName":"González Mazzei","City":"Montevideo"},"DoNotUseCallback":false,"ExtendedBINInformation":true,"MetaReference":"fvidal@plexo.com.uy","OptionalCommerceId":84,"RedirectUri":"https://google.com.uy/","Type":0}},"UTCUnixTimeExpiration":1703296821},"Signature":"YOUR_CORRECTED_SIGNATURE_HERE"} ``` -------------------------------- ### JavaScript Configuration for Document Viewer Source: https://drive.google.com/file/d/1gcwiAs-NEfbue8eRLKzTZZR7V2bVXA2x/view This JavaScript snippet configures settings for a document viewer, potentially within a web application. It sets various flags and parameters related to document loading, rendering, and feature toggles. This configuration is likely client-side. ```javascript window['_DRIVE_VIEWER_ctiming']['difs']=performance.now();_docs_flag_initialData={ "docs-ails":"docs_cold", "docs-fwds":"docs_nf", "docs-crs":"docs_crs_nl", "docs-cp-tp":6, "docs-cr-tp":5, "docs-fe-re":2, "docs-fl":2, "docs-l1lc":2, "docs-l1lm":"IAD", "docs-l2lc":2, "docs-l2lm":"MRN", "docs-l2t":0, "docs-lsd":3, "docs-orl":1, "docs-rls":4, "docs-shdn":0, "docs-eivt":false, "docs-tfh":"", "info_params":{}, "docs-epfdfjes":false, "docs-ecdh":true, "docs-eawbwm":true, "docs-eavlbm":true, "docs-ecbwm":true, "docs-ecucbwm":true, "docs-edlmbm":true, "docs-eafwbwm":true, "docs-eabwm":true, "docs-elaswm":true, "docs-ebwm":false, "docs-ncbwm":true, "docs-ecwcwm":false, "docs-ecbcwm":false, "docs-ectwm":false, "docs-ectbcm":false, "docs-edswm":true, "docs-ewcfer":true, "docs-ewubum":false, "docs-ewcm":false }; ``` -------------------------------- ### Consultar estado Source: https://context7_llms Allows querying the status of a transaction using a POST request. ```APIDOC ## POST /Operation/Status ### Description This endpoint is used to query the status of a transaction. ### Method POST ### Endpoint https://testing.plexo.com.uy:4043/SecurePaymentGateway.svc/Operation/Status ### Parameters #### Request Body - **ReferenceType** (enumerator) - Required - Specifies the type of identifier for the original transaction. - **MetaReference** (string) - Required - Contains the identifier of the original transaction to be queried. ### Request Example ```json { "ReferenceType": "TransactionId", "MetaReference": "12345" } ``` ### Response #### Success Response (200) - **Status** (string) - The status of the transaction. - **Message** (string) - A message describing the transaction status. #### Response Example ```json { "Status": "Success", "Message": "Transaction found and processed." } ``` #### Error Response (400/500) - **Status** (string) - An error status. - **Message** (string) - A message describing the error. ```json { "Status": "Error", "Message": "Invalid transaction ID." } ``` ``` -------------------------------- ### Configurar Medio de Pago para un Comercio Source: https://context7_llms Realiza un POST a la API para configurar un medio de pago para un comercio. Requiere un objeto IssuerData con IssuerId, CommerceId y FieldType. Si ya existe, se realiza un UPDATE. ```HTTP POST /SecurePaymentGateway.svc/Commerce/Issuer/Add Content-Type: application/json { "IssuerData": { "IssuerId": "ID_DEL_MEDIO_DE_PAGO", "CommerceId": "ID_DEL_COMERCIO", "FieldType": { "CommerceIssuerInstallments": "1,3,6,9,12", "AvailableBanks": "113,137" } } } ``` -------------------------------- ### POST /Operation/SplitPurchase Source: https://context7_llms Initiates a split payment transaction, authorizing two separate payments to different merchants. ```APIDOC ## POST /Operation/SplitPurchase ### Description This endpoint allows you to perform two payment authorizations to distinct merchants within a single transaction. It is designed to work exclusively with credit cards. ### Method POST ### Endpoint https://testing.plexo.com.uy:4043/SecurePaymentGateway.svc/Operation/SplitPurchase ### Parameters #### Request Body - **ClientReferenceId** (string) - Required - Reference ID for transaction traceability. - **CurrencyId** (integer) - Required - Currency code (1-Peso, 2-Dolar). - **FinancialInclusion** (object) - Optional - Information for Financial Inclusion Law. - **BilledAmount** (decimal) - Required - Total purchase amount with taxes. - **InvoiceNumber** (string) - Required - Invoice number. - **TaxedAmount** (decimal) - Required - Net purchase amount without taxes. - **Type** (integer) - Required - Law type: 0-No apply, 1-Law 17934, 6-Law 19210. - **Installments** (integer) - Required - Number of installments. - **Items** (array) - Required - List of purchase items. - **Amount** (decimal) - Required - Item amount. - **ClientItemReferenceId** (string) - Required - Item ID. - **PaymentInstrumentInput** (object) - Required - Contains InstrumentToken and optional values required by the payment provider. - **OptionalCommerceId** (string) - Required - Mandatory for Split Payments, indicates the commerce for each PaymentRequest. - **LoyaltyProgramAmount** (decimal) - Optional - Amount for affinity products like OCA meters. - **OptionalInstrumentFields** (object) - Optional - Additional fields required by some payment methods (e.g., VISA). ### Request Example ```json { "ClientReferenceId": "TRX12345", "CurrencyId": 1, "FinancialInclusion": { "BilledAmount": 300.0, "InvoiceNumber": "INV-6789", "TaxedAmount": 250.0, "Type": 1 }, "Installments": 1, "Items": [ { "Amount": 150.0, "ClientItemReferenceId": "ITEM001" }, { "Amount": 150.0, "ClientItemReferenceId": "ITEM002" } ], "PaymentInstrumentInput": { "InstrumentToken": "TOKEN_ABC123", "CCV": "123" }, "OptionalCommerceId": "COMMERCE_XYZ", "LoyaltyProgramAmount": 0, "OptionalInstrumentFields": { "CybersourceDeviceFingerprint": "FP_XYZ789" } } ``` ### Response #### Success Response (200) - **Transaction** (object) - Information about the performed transaction. #### Response Example ```json { "TransactionId": "TXN987654", "Status": "Approved", "Message": "Transaction successful." } ``` ### Error Handling - **400 Bad Request**: Invalid request payload or missing required fields. - **401 Unauthorized**: Authentication failed. - **500 Internal Server Error**: Unexpected server error. ``` -------------------------------- ### JavaScript Dependency Injection and Global State Management Source: https://drive.google.com/file/d/1gcwiAs-NEfbue8eRLKzTZZR7V2bVXA2x/view Manages global state and dependencies using a singleton pattern (`_.Md`). It exposes various service interfaces through a central `_.Nd` object, providing access to features like promise-like objects and configuration. This pattern is common in large JavaScript applications for managing shared resources. ```javascript var Ld=function(a){if(a.o.length>0){var b=a.i!==void 0,c=a.j!==void 0;if(b||c){b=b?a.v:a.A;c=a.o;a.o=\[\];try{\_.Ac(c,b,a)}catch(d){console.error(d)}}}}; \_.Jd.prototype.v=function(a){a.j&&a.j.call(a.i,this.i)};\_.Jd.prototype.A=function(a){a.o&&a.o.call(a.i,this.j)};var Kd=function(a,b,c){this.j=a;this.o=b;this.i=c};\_.Jd.prototype.aa=\_.Jd.prototype.then;\_.F("gbar.B",\_.Nd);\_.Nd.prototype.ba=\_.Nd.prototype.jj;\_.Nd.prototype.bb=\_.Nd.prototype.tj;\_.Nd.prototype.bd=\_.Nd.prototype.qj;\_.Nd.prototype.bf=\_.Nd.prototype.aj;\_.Nd.prototype.bg=\_.Nd.prototype.ij;\_.Nd.prototype.bh=\_.Nd.prototype.fj;\_.Nd.prototype.bj=\_.Nd.prototype.Ui;\_.Nd.prototype.bk=\_.Nd.prototype.Ti;\_.Nd.prototype.bl=\_.Nd.prototype.kj;\_.F("gbar.a",\_.Nd.i());window.gbar&&window.gbar.ap&&window.gbar.ap(window.gbar.a); ```