Hi, I can't access any method of this dll (https://github.com/TransbankDevelopers/transbank-sdk-dotnet). Could you help me ?
I just need an example of how to start.
DO wwUtils
do wwDotNetBridge
LOCAL loBridge as wwDotNetBridge
loBridge = CreateObject("wwDotNetBridge","V4")
lobridge.loadassembly("TransbankPosSDK.dll")
loPOSIntegrado = loBridge.CreateInstance("Transbank.POSIntegrado.POSIntegrado")

We're not going to do your work for you with your business specific example.
Please: Provide some working code or code that fails with precise examples and/or a reference to what .NET functions you're trying to call and we can try to give you more information on what you can try.
Nobody here is going to go through the steps to clone a repo and install a library locally just to test your code for you unless you want to pay for support so you can have "just an example of how to start".
+++ Rick ---
Hello, expression "just an example of how to start" was not for them to do my job but it would not be the first time q I do not see a mistake in front of my eyes.
My problem is that following the examples and having the library registered. When I run
lobridge.loadassembly("TransbankPosSDK.dll")
loCallBack = CREATEOBJECT("MyCallback")
loPOSIntegrado = loBridge.CreateInstance("Transbank.POSIntegrado.POSIntegrado")
DEFINE CLASS MyCallback as custom
*** Returns the result of the method and the name of the method name
FUNCTION OnCompleted(lvResult,lcMethod)
? "Success: " + lcMethod,lvResult
ENDFUNC
* Returns an error message, a .NET Exception and the method name
FUNCTION OnError(lcMessage,loException,lcMethod)
? "Error: " + lcMethod,lcMessage
ENDFUNC
ENDDEFINE
I don't get any error. loPOSIntegrated is type object but has no visible properties or methods.
I try to access this code.
public async Task
loBridge.InvokeMethodAsync(loCallback,loPOSIntegrado,"Sale",12345)
namespace Transbank.POSIntegrado
{
public class POSIntegrado : Serial
{
public POSIntegrado()
{
}
public static POSIntegrado Instance { get; } = new POSIntegrado();
public async Task<SaleResponse> Sale(int amount, string ticket, bool sendStatus = false)
You have to pass all the parameters to the method. No such thing as optional parameters when calling with Reflection via wwDotnetBridge.
+++ Rick ---
Hi, One step and new error 😦
Cannot load file or assembly 'System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the specified file.
I have the dll registered. I tried copy to system32 didn't work, SysWOW64 didn't work either. What can be? I keep investigating.
System.IO.Ports is a built-in .NET assembly that lives in the GAC. It should be referenced by the API you're calling unless you are accessing a type in that namespace directly in your code, in which case you have to reference the GAC assembly via its fully qualified assembly name or the path in the GAC folder.
The fully qualified assembly name is the name in the error message.
+++ Rick ---
Hi,
New problem
Delete system.io.ports from my project, install same and diferent version but doesnt work.