First Attempt to implement Payment SDK for WebWorks. #455
Conversation
there is an .so file in there too, please remove that. Thats a build time artifact and doesn't need to be a part of the repo |
we don't use cmake anymore, this need to be converted to use the qnx make system |
ok |
|
||
paymentJNext.stopEvents(); | ||
|
||
//if (result === SUCCESS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove commented code that is not used
please use jake lint to fix your lint errors |
if (extra_parameter_count) | ||
{ | ||
//int i; | ||
for (int i = 0; i > extra_parameter_count; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure this loop is correct? What are the possible values of extra_parameter_count? I think it will be > 0 right? If so the loop will never be entered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya... I see that. sorry. Will fix it.
RE "please use jake lint to fix your lint errors" I didn't understand what exactly I need to do to address that. Sorry. |
run jake lint in your framework folder to see the lint problems with your code, it will display which files and lines need to be fixed, this branch will not build on our CI server until the lint problems are fixed |
I found few code areas to fix.... Thanks |
I made bunch of changes. But, I am having hard time to amend the commit on "'next-payment-sdk'" branch. Looks like that the "amend" worked fine locally. But, I can't seem to push the changes. |
need to force push because you changed the history so use git push -f origin next-payment-sdk |
Ok, thanks. Not sure how I changed the history, I may have done it accidentally. I am still learning Git. I made bunch of changes in the "amended version". I am still working on "make". |
you change the history every time you do git commit --amend as you are changing an already pushed commit. |
ok, thanks. |
Seems like nobody is reviewing latest code. Do I need to do anything else or do I just need to wait? Also, I am working on "make" and fixing few things found by "make". |
this code still doesn't pass lint |
well I don't see any payment problem. I haven't touched any other folder except "payment". The only thing I find is - ext\Payment\index.js : But that doesn't show up in the "error" section. |
it's not passing cpplint, are you running this on windows? |
also missing unit tests |
yes... The only thing I can say is that "Payment" folder has upper case "P". It may need to be renamed as "payment" with lower case "p". Other than that I don't know. |
|
||
purchase_arguments_t* args = NULL; | ||
std::stringstream ss; | ||
try{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the c++ exceptions, we do not use c++ exceptions
@Pagey @jeffheifetz I've removed all event trigger code. And here's the docs pull request: blackberry/WebWorks-API-Docs#447 |
@Pagey @jeffheifetz Please resume review. @nukulb is hoping to fold ASAP |
Our SV&V testing team uncovered a possible issue around purchase (while working on the extended test app) . We are going to investigate it today and find a solution. I grabbed the latest code from github. If any change are made, it will be around input validation. |
return 1; | ||
} | ||
|
||
int PaymentBPS::onCancelSubscriptionSuccess(bps_event_t *event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ on next line
everything looks good after comments |
@shamim1 Please keep us posted regarding the issues found by your SV&V. This change needs to go in soon. |
While running jake unfortunately I still get the error. I got proper NDK and ran “C:\bbndk\bbndk-env_10_0_9_2270.bat” to make sure the proper NDK is used. But, I just wonder where is “existsSync” method. It is called in bundler.js:93:17. It could be npm error. I may have to reinstall “fs” module (I guess). Here is the error – TypeError: Object # has no method 'existsSync' |
I suspect this might actually have to do with node. Which version of node are you running? |
6.10 |
v0.6.10 |
@shamim1 I think we have upgraded to the 0.8.14, please upgrade to latest node |
O, ok. |
I am in the process of uninstalling the old node.js and installing the new one. I am following the post below (for my windows XP OS) Unfortunately I have only 1 hour today. But, I will make sure that on Monday this is my first priority and will make sure that the specific defect is fixed before I go home on Monday. Hopefully that won't be too late for you. |
tested in 10.0.10.225 with packager build http://wwci:8080/view/BB10-WebWorks-Packager/view/Jobs/job/BB10-Webworks-Packager-next/26/ and framework build http://wwci:8080/view/BB10-WebWorks-Framework/view/Jobs/job/BB10-WebWorks-Framework-next-payment-sdk/28/:
|
@tracyli There is no automated test because purchase would show a dialog, can't automate it w/o automation. As for the error value, @shamim1 can you confirm if the error id will always be 0 when we use developmentMode, the docs says so for one of the functions, if that's the case I'd add the note to all functions. Also, @shamim1 please update us about the findings from your team's SV&V ASAP. |
There was an issue in previous bps libraries where error id was always 0 on development mode, but this should have been fixed a while back. Ash can investigate to see if this is still happening for some reason, or if there is just an issue in the webworks implementation. |
I fixed the problem that we found on Friday. It was a easy fix. :) |
On further inspection, this is a known issue on release9 builds. The fix was only targeted for 10.1+. As for the BBID question, we have a test environment which the devices can be configured to use, with test payment instruments etc, to facilitate this. See our wiki page (http://wikis.rim.net/display/bbaw/BB10+Payment+Service+Configuration+Guide) Ultimately, our "proper" test app will be made available on eval and production servers, to allow the "full" testing of an app downloaded from AW, being used for WW purchases. This app is being completed by our SVV devs as we speak, as I understand. |
The time taken was to setup the environment and testing with few different variance. |
@scdowney so can you confirm if this note in getExistingPurchases error callback param: "Note: The actual values may be different when developmentMode equals true. should be added to all functions? since the fix isn't in R9 builds yet? |
The fix only applies to purchases in development mode, actually. That is the only place where a "Simulated" error can be produced. All of the other calls just provide a "Canned" successful response in development mode. The only place I can think of another error happening in development mode, off the top of my head, would be the new -1 error we introduced for unknown app errors. Sent from my BlackBerry 10 smartphone. From: Rosa TseSent: Monday, January 28, 2013 1:28 PMTo: blackberry/BB10-WebWorks-FrameworkReply To: blackberry/BB10-WebWorks-FrameworkCc: Shawn DowneySubject: Re: [BB10-WebWorks-Framework] First Attempt to implement Payment SDK for WebWorks. (#455)@scdowney so can you confirm if this note in getExistingPurchases error callback param: "Note: The actual values may be different when developmentMode equals true. should be added to all functions? since the fix isn't in R9 builds yet?
|
I've fixed the docs to move the note from getExistingPurchases to purchase. As far as I understand, this is now good to go? Anyone who has concern please voice out ASAP. |
@rwmtse has that change been pushed somewhere? I can't seem to find it... I'd like to just take a scan over the "final" docs, since it sounds like this is wrapping up |
@scdowney you can find the latest built docs here |
Reviewed by: Eric Pearson <epearson@rim.com>, Jeffrey Heifetz <jheifetz@rim.com> Tested by: Tracy Li <tli@rim.com>
Merged Manually |
Implemented API method for "Purchase" method in Payment Service.
(First Push attempt didn't have any changes as I forgot to check-in code before pushing to github.)