Preciso integrar o Modulo de pagamento do Mercado Pago com o meu site em asp, já esta praticamente tudo criado, não estou conseguindo criar o link para pagamento, conforme cod abaixo:
' //////// marecado pago //////////
<!--#include file="
mercadopago.asp"-->
<!--#include file="
JSON_2.0.4.asp"-->
<!--#include file="
json2.asp"-->
<% Case 11
If pedido_status = 0 Then
form_action = "
https://www.mercadopago.com/mlb/checkout/pay"
form_target = "_blank"
form_popup = ""
form_text = ""
form_text = form_text & "<input type=""hidden"" name=""email_cobranca"" value=""" & fd_configuracoes(49,0) & """>"
' form_text = form_text & "<input type=""hidden"" name=""tipo"" value=""cp"">"
' form_text = form_text & "<input type=""hidden"" name=""moeda"" value=""brl"">"
form_text = form_text & "<input type=""hidden"" name=""seller_op_id"" value=""" & htmlwrite(objrs2("id")) & """>"
form_text = form_text & "<input type=""hidden"" name=""acc_id"" value=""xxxxxxxx"">"
' form_text = form_text & "<input type=""hidden"" name=""moeda"" value=""brl"">"
form_text = form_text & "<input type=""hidden"" name=""enc""
value=""xxxxxxxxxxxxxxxxxxxxxxxx"">"
form_text = form_text & "<input type=""hidden"" name=""currency"" value=""rea"">"
' form_text = form_text & "<input type=""hidden"" name=""tipo_frete"" value=""en"">"
cont = 0
objrs3.MoveFirst
While Not
objRS3.EOF
Cont = Cont + 1
form_text = form_text & "<input type=""hidden"" name=""item_id_" & Cont & """ value=""" & objRS3("id") & """>"
form_text = form_text & "<input type=""hidden"" name=""name" & Cont & """ value=""" & HtmlWrite(objRS3("produto")) & """>"
' form_text = form_text & "<input type=""hidden"" name=""item_quant_" & Cont & """ value=""" & objRS3("qtd") & """>"
var1 = CCur(objRS3("preco"))
If IsNumeric(objRS3("presente_embrulho_valor_adicional")) Then var1 = var1 + CCur(objRS3("presente_embrulho_valor_adicional"))
If IsNumeric(objRS3("presente_cartao_valor")) Then var1 = var1 + CCur(objRS3("presente_cartao_valor"))
var1 = FormataValor(var1)
var1 = Replace(var1, ".", "")
Var1 = Replace(var1, ",", "")
form_text = form_text & "<input type=""hidden"" name=""price" & Cont & """ value=""" & var1 & """>"
form_text = form_text & "<input type=""hidden"" name=""shipping_cost" & Cont & """ value=""0"">"
form_text = form_text & "<input type=""hidden"" name=""op_retira"" value="">"
' form_text = form_text & "<input type=""hidden"" name=""item_peso_" & Cont & """ value=""0"">"
' form_text = form_text & "<input type=""hidden"" name=""item_valor_" & Cont & """ value=""" & var1 & """>"
' form_text = form_text & "<input type=""hidden"" name=""item_frete_" & Cont & """ value=""0"">"
' form_text = form_text & "<input type=""hidden"" name=""item_peso_" & Cont & """ value=""0"">"
objRS3.MoveNext
Wend
var1 = CCur(objRS2("desconto"))
If var1 > 0 Then
Cont = Cont + 1
form_text = form_text & "<input type=""hidden"" name=""item_id" & Cont & """ value=""0"">"
form_text = form_text & "<input type=""hidden"" name=""name" & Cont & """ value=""DESCONTO - " & FormataValor(objRS2("desconto")) & "%"">"
' form_text = form_text & "<input type=""hidden"" name=""item_quant_" & Cont & """ value=""1"">"
var1 = FormataValor(CCur(objRS2("total_produtos"))*(var1/100))
var1 = Replace(var1, ".", "")
Var1 = Replace(var1, ",", "")
form_text = form_text & "<input type=""hidden"" name=""price" & Cont & """ value=""-" & var1 & """>"
form_text = form_text & "<input type=""hidden"" name=""Shipping_cost" & Cont & """ value=""0"">"
' form_text = form_text & "<input type=""hidden"" name=""item_peso_" & Cont & """ value=""0"">"
End If
If CCur(objRS2("entrega_valor_frete")) > 0 Then
Cont = Cont + 1
form_text = form_text & "<input type=""hidden"" name=""item_id_" & Cont & """ value=""0"">"
form_text = form_text & "<input type=""hidden"" name=""item_descr_" & Cont & """ value=""Entrega - " & HtmlWrite(objRS2("entrega_titulo")) & """>"
form_text = form_text & "<input type=""hidden"" name=""item_quant_" & Cont & """ value=""1"">"
var1 = FormataValor(objRS2("entrega_valor_frete"))
var1 = Replace(var1, ".", "")
Var1 = Replace(var1, ",", "")
form_text = form_text & "<input type=""hidden"" name=""item_valor_" & Cont & """ value=""" & var1 & """>"
form_text = form_text & "<input type=""hidden"" name=""item_frete_" & Cont & """ value=""0"">"
form_text = form_text & "<input type=""hidden"" name=""item_peso_" & Cont & """ value=""0"">"
End If
form_text = form_text & "<input type=""hidden"" name=""cart_name"" value=""" & HtmlWrite(objRS("nome")) & """>"
form_text = form_text & "<input type=""hidden"" name=""cart_cep"" value=""" & cep & """>"
form_text = form_text & "<input type=""hidden"" name=""cart_street"" value=""" & HtmlWrite(objRS("endereco")) & """>"
form_text = form_text & "<input type=""hidden"" name=""cart_number"" value=""" & HtmlWrite(objRS("numero")) & """>"
form_text = form_text & "<input type=""hidden"" name=""cart_complement"" value=""" & HtmlWrite(objRS("complemento")) & """>"
form_text = form_text & "<input type=""hidden"" name=""cart_district"" value=""" & HtmlWrite(objRS("bairro")) & """>"
form_text = form_text & "<input type=""hidden"" name=""cart_city"" value=""" & HtmlWrite(objRS("cidade")) & """>"
var1 = captura_uf(objRS("estado_provincia"))
form_text = form_text & "<input type=""hidden"" name=""cart_state"" value=""" & var1 & """>"
' form_text = form_text & "<input type=""hidden"" name=""cliente_pais"" value=""BRA"">"
' form_text = form_text & "<input type=""hidden"" name=""cliente_ddd"" value="""">"
form_text = form_text & "<input type=""hidden"" name=""cart_phone"" value="""">"
form_text = form_text & "<input type=""hidden"" name=""cart_email"" value=""" & HtmlWrite(objRS("email")) & """>"
' form_text = form_text & "<input type='button' onClick='form_submit()' value='Efetuar pagamento'>"
' form_text = form_text & "<input type=""hidden"" name=""_redirUrl"" value=""
https://www.mercadopago.com/mlb/buybutton"">"
' form_text = form_text & "<input type='image' onclick='startTrackStatus()' src='/images/
bt_pay_mercadopago.png' border='0' alt='Pagar utilizando MercadoPago'>"
' Else
' form_text = ""
' End If
form_text = form_text & "<input type='button' onClick='form_submit()' value='Efetuar pagamento'>"
Else
form_text = ""
End If
' FIM MERCADO PAGO //////////////////////////////////////////////////////////
Prazo de Entrega: 30 de Outubro de 2017