[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: http_url_post_raw issue



Vikas,

I think it unlikely that your browser is really doing the same thing 
that your RPG code is.  It's certainly POSSIBLE to do the same thing 
with a browser, but it'd require some tricky JavaScript coding, because 
by default, the browser will URL encode the data it uploads, whereas 
your RPG program is not doing that.  (The aforementioned "tricky 
JavaScript" would be code that does the POST without URL encoding it.)

However, it's REALLY hard to say if that has anything to do with the 
problem, since you've provided very little information.

You've sent me a snippet of RPG code that you say doesn't work.  Great! 
  Now I know part of the process to make the web service fail.  And, 
maybe I can guess at the rest...

But, perhaps more important, is knowing how to make the web service 
succeed.  That's the information you haven't provided!

If you have a way of telling the browser to upload the file correctly, 
how about telling us what that is??  Then perhaps we can tell you what 
you're doing differently from what the browser is doing, and hopefully 
get you on the right track...



Vikas M wrote:
>    Hi Everybody,
> 
>     I am using this API http_url_post_raw  to validate/charge crdit card
>    but i get a return error saying that request is not well formed . This
>    error is actually being returned from credit card verification server
>    so it is communicating with it.
> 
>    But when I use the same request on web browser page , it works
>    fine. Can anybody please point out where am I making the mistake? Here
>    are the details:
> 
> 
> 
>      xmldata=
>    'xmldata=<txn><ssl_merchant_ID>XXXXXX</ssl_merchant_ID><ssl_user_id'+
>     '>YYYYYYY</ssl_user_id><ssl_pin>ZZZZZZ</ssl_pin><ssl_transaction_t'+
>     'ype>ccsale</ssl_transaction_type><ssl_card_number>542121355647874'+
>     '5</ssl_card_number><ssl_exp_date>0212</ssl_exp_date>'+
>     '<ssl_amount>42.3</ssl_amount><ssl_salestax>0.00</ssl_salestax><ss'+
>     'l_cvv2cvc2_indicator>1</ssl_cvv2cvc2_indicator><ssl_cvv2cvc2>212<'+
>     '/ssl_cvv2cvc2><ssl_customer_code>8745</ssl_customer_code><ssl_fir'+
>     'st_name>John</ssl_first_name><ssl_last_name>Muir</ssl_last_name><'+
>     'ssl_avs_address>1254 Las Positas '+
>     'Dr</ssl_avs_address><ssl_address2></ssl_address2><ssl_city>concor'+
>     'd</ssl_city><ssl_state>CA</ssl_state><ssl_avs_zip>94521</ssl_avs_'+
>     'zip></txn>' ;
> 
> 
> 
> 
> 
> 
>     eval      rc = http_url_post_raw(
>               'https://www.myvirtualmerchant.com/'    +
>                'VirtualMerchant/processxml.do?'
>                 : %addr(xmldata): %len(%trimr(xmldata))
>                 : 1
>                 : %paddr('INCOMING')
>                 : 1)
> 
> 
> 
>    Looks like the credit card server doesnt receive the above request
>    properly and returns me an error saying request not well formed. This
>    error is listed as one of their return errors.
> 
>    But when I do paste of same request on browser page, I get proper
>    result.
> 
> 
> 
>    Thanks,
> 
>    Vikas Mishra
>    [1]vikasm@xxxxxxxxxx
>    IT Applications
>    SCJ Insurance Services
> 
> References
> 
>    1. outbind://118/vikasm@xxxxxxxxxx
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------