Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added handling of parameters of stripev3.load #35

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

caltabid
Copy link

@caltabid caltabid commented Jun 2, 2018

I added this feature to support direct payment on connected accounts.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.308% when pulling a2c44d9 on caltabid:master into d0eb463 on code-corps:master.

@joshsmith
Copy link
Contributor

@caltabid thanks for the PR!

Are there any issues with the recent merges here? Would you mind rebasing and checking? Thank you!

@lindyhopchris
Copy link
Contributor

@caltabid I see you've back merged develop into your branch. Think I therefore need to set the merge target as develop not master?

@caltabid
Copy link
Author

caltabid commented Sep 3, 2019

@lindyhopchris for my project I need both SCA modification introduced in develop and the possibility to handle options parameters in stripe.load introduced in my branch.
The best would be to merge develop in the master along with my modifications.
I also had some compatibility issues with ember 2.18 described in #65 can someone confirm this problem?

@lindyhopchris
Copy link
Contributor

@caltabid totally understand. The develop branch has the SCA stuff on it... that's what I'm also using as I'm doing updates for SCA now too.

I'll change the target branch for this PR to develop. Understand about wanting to get it into master but we need to do that with a tagged release... which hopefully we'll get sorted. FYI in the meantime I'm tying my Ember apps to specific commit references on the develop branch as a work-around.

I'll take a look at #65 now.

@lindyhopchris lindyhopchris changed the base branch from master to develop September 5, 2019 07:37
@@ -28,3 +28,7 @@ package.json.ember-try

.DS_Store
yarn-error.log

#Eclipse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change isn't necessary. If it's the editor you use, then it should be in your global gitignore not here.

@@ -64,6 +64,25 @@ export default Component.extend({

setEventListeners() {
let stripeElement = get(this, 'stripeElement');
stripeElement.on('ready', (event) => this.sendAction('ready', stripeElement, event));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to this file need to be removed because they are unrelated to what this PR is trying to do - i.e. add options to the init method on the service.


unload() {
this.set('didConfigure', false);
this.set('didLoad', false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In configure, the methods from the Stripe object are copied across to this. Totally agree with adding an unload method, in case you need to swap Stripe Connect accounts. However, I think unload should set all the methods that were copied across to null so that they are cleared out.

this.set('didLoad', false);
},

load(publishableKey = null, params = null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we set the params on this so that they are available in tests to assert that the correct params were passed through? Unlike publishableKey, I don't think they need to be wrapped in an if before setting, because no params are taken from default configuration.

@lindyhopchris
Copy link
Contributor

@caltabid generally approach looks good and it'll be great to have these changes - so thanks for the PR. Have added some comments. Now that it's against the develop branch it's clear exactly what is being changed by this PR and I think it makes sense to keep the code changes solely focused on adding params to the load method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants