课程内容

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;

         }

     }

}





视图
344 总浏览
1 成员的观点
676 公众浏览
操作
0 喜爱
0 不喜欢
0 注释
分享到社交网络
分享链接
通过邮件分享

登录 分享这个 webpage 通过电子邮件。