课程内容

Out Of Band - Merchant Webservice

Merchant Webservice 

The sections covers the Webservice example which the merchant can implement in order to consume the transaction responses as and when they are delivered by the Gateway's out of band notification system.

Out of Band Sample:

namespace 

{

       public class Response: IResponse

  {

            public string TransactionResponse(Response_message message)

   {

                      string decoded_response = null;

                      string response_message = null;

                      string response = message.message;

                    //Deserialize the message and get the response

                     dynamic dynJson = JsonConvert.DeserializeObject(response);

                     string deserialized_response = dynJson.Response;

                     //Decode the response from base64

                    byte [] response_data = System.Convert.FromBase64String(deserialized_response);

                    decoded_response = System.Text.ASCIIEncoding.ASCII.GetString(response_data);

                    response_message = decoded_response;

                    Log.WriteLog(response_message);

                    return response_message;

         }

     }

}





额定值
0 0

目前没有任何评论。

成为第一个发表评论的人。