Return-Path: Delivered-To: apmail-shindig-issues-archive@www.apache.org Received: (qmail 56628 invoked from network); 9 Nov 2010 07:35:17 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Nov 2010 07:35:17 -0000 Received: (qmail 93201 invoked by uid 500); 9 Nov 2010 07:35:48 -0000 Delivered-To: apmail-shindig-issues-archive@shindig.apache.org Received: (qmail 93136 invoked by uid 500); 9 Nov 2010 07:35:46 -0000 Mailing-List: contact issues-help@shindig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@shindig.apache.org Delivered-To: mailing list issues@shindig.apache.org Received: (qmail 93040 invoked by uid 99); 9 Nov 2010 07:35:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Nov 2010 07:35:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Nov 2010 07:35:44 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oA97ZOcC008274 for ; Tue, 9 Nov 2010 07:35:24 GMT Message-ID: <6682404.98011289288124107.JavaMail.jira@thor> Date: Tue, 9 Nov 2010 02:35:24 -0500 (EST) From: "Paul Lindner (JIRA)" To: issues@shindig.apache.org Subject: [jira] Commented: (SHINDIG-1443) some odd features in opensocial Payment feature(extra) In-Reply-To: <23085224.37971286524231318.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SHINDIG-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930002#action_12930002 ] Paul Lindner commented on SHINDIG-1443: --------------------------------------- Is this compliant with the documentation at https://docs.google.com/a/google.com/Doc?id=dfjcf7w4_10ddst9xd9&hl=en > some odd features in opensocial Payment feature(extra) > ------------------------------------------------------ > > Key: SHINDIG-1443 > URL: https://issues.apache.org/jira/browse/SHINDIG-1443 > Project: Shindig > Issue Type: Improvement > Components: Javascript > Affects Versions: 2.0.0 > Reporter: Naosuke Yokoe > Fix For: 2.0.0 > > > 1. When to create opensocial.ResponseItem in extras/opensocial-payment/jsoncontainer.js, original code uses opensocial.Payment.ResponseCode values instead of opensocial.ResponseItem.Error values. It is not a good manner. > 2. Replaced some redundant codes > Index: jsoncontainer.js > =================================================================== > --- jsoncontainer.js (rev 1005715) > +++ jsoncontainer.js (working copy) > @@ -37,8 +37,8 @@ > JsonRpcContainer.prototype.requestPayment = function(payment, opt_callback) { > if (!payment) { > if (opt_callback) { > - opt_callback(new opensocial.ResponseItem(null, payment, > - opensocial.Payment.ResponseCode.MALFORMED_REQUEST, > + opt_callback(new opensocial.ResponseItem(null, null, > + opensocial.ResponseItem.Error.BAD_REQUEST, > 'Payment object is undefined.')); > } > return; > @@ -64,16 +64,14 @@ > JsonRpcContainer.requestPaymentCallback_ = function(callbackId, paymentJson) { > callback = callbackIdStore[callbackId]; > if (callback) { > - var errorCode = opensocial.Payment.ResponseCode[ > - paymentJson[opensocial.Payment.Field.RESPONSE_CODE]]; > + var errorCode = paymentJson[opensocial.Payment.Field.RESPONSE_CODE]; > var message = paymentJson[opensocial.Payment.Field.RESPONSE_MESSAGE]; > > - paymentJson[opensocial.Payment.Field.RESPONSE_CODE] = errorCode; > var payment = new JsonPayment(paymentJson, false); > var responseItem = new opensocial.ResponseItem( > null, > payment, > - (errorCode == opensocial.Payment.ResponseCode.OK ? null : errorCode), > + (errorCode == opensocial.Payment.ResponseCode.OK ? null : opensocial.ResponseItem.Error.BAD_REQUEST), > message); > callback(responseItem); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.