2014-10-10 39 views
1

我正在尝试将CLickBankINSV6.0集成到我的c#应用程序中。Clickbank INS V6.0集成c#

我以类似样本响应尝试:

{ 
    "notification": { 
     "version": 6, 
     "attemptCount": 0, 
     "role": "VENDOR", 
     "site": "nicholeen", 
     "receipt": "********", 
     "currency": "USD", 
     "transactionType": "TEST", 
     "transactionTime": 1406070122781, 
     "paymentMethod": "VISA", 
     "totalProductAmount": 1, 
     "totalTaxAmount": 0, 
     "totalShippingAmount": 0, 
     "customer": { 
      "shipping": { 
       "firstName": "TEST", 
       "lastName": "USER", 
       "fullName": "Test User", 
       "email": "[email protected]", 
       "address": {} 
      }, 
      "billing": { 
       "firstName": "TEST", 
       "lastName": "USER", 
       "fullName": "Test User", 
       "email": "[email protected]", 
       "address": {} 
      } 
     }, 
     "lineItems": [ 
      { 
       "itemNo": "1", 
       "productTitle": "A passed in title", 
       "shippable": false, 
       "recurring": false, 
       "customerProductAmount": 1, 
       "customerTaxAmount": 0 
      } 
     ] 
    }, 
    "iv": "1A0b7S1R" 
} 

但始终我正在从ClickBank的消息“无法发送测试通知”。

是否有任何可以通过测试获得成功的样本测试响应?

+0

你解决了这个问题吗? Clickbank发送加密值通知和iv。首要任务是使用您的密钥解密这个密钥,然后您将获得json值。只需解析json即可获得结果。 – waghekapil 2015-03-24 19:23:08

回答

1
string sContent = ""; 
string encryptednotfication = ""; 
string vector = ""; 
using (System.IO.Stream receiveStream = Request.InputStream) 
{ 
    // Move to begining of input stream and read 
    receiveStream.Position = 0; 
    using (System.IO.StreamReader readStream = 
      new System.IO.StreamReader(receiveStream, Encoding.UTF8)) 
      { 
       // Load into XML document 
       sContent = readStream.ReadToEnd(); 
      } 
}