Custom checkout in VB.NET

0

I would need help to integrate custom. I'm working in Visual Studio 2010. I get the following error when I want to perform init_point

Value cannot be null.
Parameter name: url

I attach the code. If I pass variables p00 and p01 I do not generate the error.

Dim ok As String = ""
Dim fail As String = ""
Dim pending As String = ""
Dim _img As String = "http://www.xx.com.ar/images/products/" + Trim(_id) + ".jpg"
Dim url As String = ""
Dim p00 As String = "{""items"":[{""id"":" & Chr(34) + Trim(_id) + Chr(34) & ",""title"":" & Chr(34) + Trim(_des) + Chr(34) & ",""description"":" & Chr(34) + Trim(_des) + Chr(34) & ",""picture_url"":" & Chr(34) + _img + Chr(34) & ",""quantity"":" & _can & ",""currency_id"":""ARS"",""unit_price"":" & Session("importe") & "}]"
Dim p01 As String = """payer"":[{""name"":" & Chr(34) + TxtNombre.Text + Chr(34) & ",""surname"":" & Chr(34) + TxtApellido.Text + Chr(34) & ",""email"":" & Chr(34) + TxtEmail.Text + Chr(34) & "}]"
Dim p02 As String = """back_urls"":[{""success"":" & Chr(34) + ok + Chr(34) & ",""pending"":" & Chr(34) + pending + Chr(34) & ",""failure"":" & Chr(34) + fail + Chr(34) & "}]"
Dim p03 As String = """auto_return"":[{""approved""}]"
Dim p04 As String = """notification_url"":[{" & Chr(34) + url + Chr(34) & "}]"
Dim prefe As String = p00 + "," + p01 + "," + p02 + "," + p03 + "," + p04 + "}"
Dim preference1 As Hashtable = mp.createPreference(prefe)
Response.Redirect(preference1("response")("init_point"))
    
asked by horacio gambaldo 11.08.2017 в 15:49
source

0 answers