Foros del Web » Programación para mayores de 30 ;) » Programación General »

Merchant account y XML

Estas en el tema de Merchant account y XML en el foro de Programación General en Foros del Web. Hola, Hace mucho que no trabajo diseño web y estoy algo oxidado en las nuevas tecnologías, una de ellas XML. Entiendo que la forma mas ...
  #1 (permalink)  
Antiguo 14/11/2006, 16:04
Avatar de SuperPayo  
Fecha de Ingreso: noviembre-2006
Mensajes: 2
Antigüedad: 17 años, 6 meses
Puntos: 0
Pregunta Merchant account y XML

Hola,

Hace mucho que no trabajo diseño web y estoy algo oxidado en las nuevas tecnologías, una de ellas XML.

Entiendo que la forma mas fácil en este caso en particular es usar PHP para generar el formulario ya que mi hosting esta en un apache, luego que un motor lo envié al merchant sobre HTTP y luego al regresar usar XML para procesar el resultado, ósea que es una mezcla de todo un poco

Agradecería mucho su ayuda en este tema:

To submit and process Direct Payments typically involves the following steps:
1. Create a payment methods page on your website that allows the user to choose to pay using the
payment option.
2. Create a payment page prompting the user for the amount (currency), their account number and their AuthCode.
3. Create a server side module/class/script that sends the amount (currency), account number,
AuthCode, the DIrect Payment Merchant operator's authentication and the Merchant’s DPID in an HTTP Post. This module/class/script must also handle parsing the XML response returned by Direct Payments service.

NOTE: Do not hardcode the merchant authentication values into any of the
web pages created or they will be visible when the source of the page is viewed.

4. Create a payment outcome page that informs the user whether the payment was successful or not.

Every payment request must have the following 6 required parameters:
*merchantId
The numeric part of the Program ID number.
*merchantUserName
The operator's loginname
*merchantPassword
The operator's login password.
NOTE: Don't hardcode this value in any of your client web pages as a hidden value.
Ensure that this value is posted by your server side module/class/script prior to sending the
request.
*Amount
The amount Numeric and optional decimals and currency symbol
currencyCode
currencyCode=”CAD”
currencyCode=”USD”
*account
The payer’s account Id, payer's account email address, or payer's account card number.
Alphanumeric account=”CS2346346”
account=bob@<domain>.com1
account=3333333333123456
*vcode
the payer’s verification code
*dpid
the merchant’s DirectPayment ID
*merchantTxnId
A reference id created by the merchant.
*expectedRespCode
When posting to the test URL this value is used to determine what
response is returned 2 digit response code expectedRespCode=”01”
will result in an NSF response being returned expectedRespCode=”00”
will result in a successful transaction response being returned.
*fastCash
Indicates whether or not fastcash can be used
alphanumeric yes/no
*bankAcctNickName
This is the consumer’s nick name for a FastCash approved bank account. When specified
the Direct Payment service will directly withdraw funds from the bank account if the consumer does not have sufficient funds to cover the total payment amount.

The Response Format:
The response returned by the Direct Payments service is a simple xml document with the following fields:
Name Description Format Examples
*respCode
indicates success (00) or an error (see error codes in index)
2 digit numeric <respCode> 00 </respCode>
*txnId
A unique reference number for the transaction created by the Direct Payments service
*merchantTxnId
The merchant reference sent in the request
*amount
the original amount as requested
*currencyCode
The currency of both the amount and merchant amount
*merchantAmount
The amount the merchant receives after any fees are deducted
*fee
The direct payment fee amount deducted from the original amount

Success response:

<?xml version="1.0" encoding="UTF-8"?>
<dpResp>
<respCode>00</respCode>
<txnId>1000</txnId>
<merchantTxnId>445744</merchantTxnId>
<currencyCode>CAD</currencyCode>
<amount>10.00</amount>
<fee>0.20</fee>
<merchantAmount>9.80</merchantAmount>
</dpResp>

NSF response:

NSF response:

<?xml version="1.0" encoding="UTF-8"?>
<dpResp>
<respCode>01</respCode>
<merchantTxnId>445744</merchantTxnId>
<currencyCode>CAD</currencyCode>
<amount>1.00</amount>
</dpResp>

Service Unavailable Response:

If for some reason the Direct Payment service is unable to process the request and return a reasonable
response then the service will normally return a 503 HTTP Response Error (Service Unavailable).

The URLs:
All live payment requests should be sent to the following URL:
ww.<sitename>.com/direct.do

Testing Direct Payments
If you want to test sending requests and receiving responses then you must use the following URL:
ww.<sitename>.com/testdirect.do

When testing, you must indicate the response code you expect in the “expectedRespCode” field.

The account and vcode fields do not have to be real when making test requests, however, they must be properly formatted. For example, a valid test value for the account field would be “CS00000” even though this would never be a valid account on the live system. Although the email address and card number of an account are considered valid authentication values for live requests, only a properly formatted account id like "CS0000" will be valid for the test request. Likewise a valid test value for the vcode field would be “000000”. Note however, that the value of the DPID field must be the actual DPID for the merchant.
The following is an example of an html form setup to post a test request that is expected to return an NSF response:

<form action=”h…s://.ww.<sitename>.com/testdirect.do” method=”post”>
<input type=”hidden” name=”merchantId” value=”18911008”>
<input type=”hidden” name=”merchantUserName” value=”admin”>
<input type=”hidden” name=”merchantPassword” value=”password”>
<input type=”hidden” name=”amount” value=”10.00”>
<input type=”hidden” name=”currencyCode” value=”CAD”>
<input type=”hidden” name=”account” value=”CS0000”>
<input type=”hidden” name=”vcode” value=”000000”>
<input type=”hidden” name=”dpid” value=”63463”>
<input type=”hidden” name=”merchantTxnId” value=”987997”>
<input type=”hidden” name=”expectedRespCode” value=”01”>
</form>

Also note that payment requests made to the test URL NEVER result in any real transactions. Therefore test transactions will never appear in the Merchant 's transaction history.

Response Code Description Notes
00 Payment completed successfully for the full amount.
01 Payment failed due to insufficient funds.
02 Payment failed due to incorrect Direct Payment ID.
03 Payment failed because Merchant has disabled Direct Payments.
04 Payment failed because Consumer account Id is invalid.
05 Payment failed because Consumer verification code is invalid.
06 Payment failed because amount is invalid or missing.
07 Payment failed because currency code is invalid, missing, or the merchant account is not
configured to accept the specified currency.
08 Payment failed due to system error.
09 Payment failed because the Consumer’s account is disabled.
10 Payment failed because the merchantTxnId parameter was missing.
11 Payment failed because FastCash was requested but the bank account nick name was invalid or does not exist.
12 Payment failed because the consumer did not have sufficient funds and requested FastCash to
cover the payment however the consumer is not currently authorized to use FastCash.
13 Payment failed because FastCash was used to cover all or part of the payment amount however the merchant does not currently accept payments made using FastCash.
14 Payment failed because FastCash was used to cover all or part of the payment amount however the payer's FashCash limit is exceeded.
15 Payment failed because the Direct Payment merchant is invalid.
16 Payment failed because Merchant is not allowed to access direct payments through the API.
17 Payment failed because the bank account has been disabled.

Estoy en Guatemala y agradeceré cualquier ayuda que me puedan dar.

Gracias
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 20:56.