Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Installation fo payment method


Shaft

Recommended Posts

Posted

I?m new arourd PHP, but i have my OSCommerce store for about a year, ad it?s working fine. But now i need to install a payment method that my bank gave me. It works this way: My page sends a request 4 the bank?s page, and then the page of the bank requests a lot of information from the order, but he hants to receive the answer parsed just like it was in ASP.

 

First thing: I can?t make my page answer the request. The manual of this method that my bank gave me explains the process in ASP, and it goes some like that:

 

if (request("transId") = "getBoleto") then %>

<BEGIN_ORDER_DESCRIPTION><orderid>=(<%= Request("numOrder") %>)

<%

for i=1 to itemDesc.count %>

<descritivo>=(<%= CStr(itemDesc(i)) %>)

<quantidade>=(<%= CInt(itemQtd(i)) %>)

<unidade>=(<%= CStr(itemUnd(i)) %>)

<valor>=(<%= itemValor(i) %>)

<%next %>

<adicional>=(frete)

<valorAdicional>=(400)

<adicional>=(manuseio)

<valorAdicional>=(1200)<END_ORDER_DESCRIPTION>



<BEGIN_BOLETO_DESCRIPTION><CEDENTE>=(Scopus.com)

<BANCO>=(<%=Application("Banco")%>)

<NUMEROAGENCIA>=(<%=Application("NumeroAgencia")%>)

<NUMEROCONTA>=(<%=Application("NumeroConta")%>)

<ASSINATURA>=(<%=Application("Assinatura")%>)

<DATAEMISSAO>=(<%=fu_formatadata(now())%>)

<DATAPROCESSAMENTO>=(<%=fu_formatadata(now())%>)

<DATAVENCIMENTO>=(<%=fu_formatadata(now())%>)

<NOMESACADO>=(NOME DO SACADO)

<ENDERECOSACADO>=(ENDERECO DO SACADO)

<CIDADESACADO>=(CIDADE DO SACADO)

<UFSACADO>=(SP)

<CEPSACADO>=(12345678)

<CPFSACADO>=(11111111111)

<NUMEROPEDIDO>=(<%= NumeroBoleto%>)

<VALORDOCUMENTOFORMATADO>=(<%=ValorTotal%>)

<SHOPPINGID>=(1)<END_BOLETO_DESCRIPTION>

<% end if %>

 

I dunno how to make the PHP do this action.

 

Second: As u can see in the code, he asks about the order number, but i need to install this mode in the checkout_confirmation.php, and in this page, the order don?t have a number yet. It is done in checkout_process.php . So, i?m asking how to make the sytem creates a order id BEFORE the checkout_confirmation. I believe it gotta be something between the checkout_payment and the chekout_confirmation page.

 

If i wasn?t clear, please ask me what do I mean wit some phrase. I?m working on this for 3 weeks with no success.

 

Thank you!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...