Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Nov 28, 2017
1 parent 4fe6524 commit f8ce93e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/stripe"
,"version": "2.4.11"
,"version": "2.5.0"
,"description": "Stripe integration with Magento 2"
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/stripe"
Expand Down
20 changes: 18 additions & 2 deletions view/frontend/web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,16 @@ return parent.extend({
* https://stripe.com/docs/api#create_source-owner
* https://stripe.com/docs/api#source_object-owner
* Hash, optional.
* 2017-11-28
* An empty value for `name` leads to the failure:
* «You passed an empty string for 'owner[name]'.
* We assume empty values are an attempt to unset a parameter;
* however 'owner[name]' cannot be unset.
* You should remove 'owner[name]' from your request or supply a non-empty value.»
* https://mage2.pro/t/5011
* To evade such failure, I have added df.clean().
*/
,owner: {
,owner: df.clean({
/**
* 2017-10-20 «Owner’s address».
* «Stripe API Reference» → «Create a source» → «owner» → «address».
Expand All @@ -488,6 +496,14 @@ return parent.extend({
* https://stripe.com/docs/api#create_source-owner-name
* https://stripe.com/docs/api#source_object-owner-name
* String, optional.
* 2017-11-28
* An empty value leads to the failure:
* «You passed an empty string for 'owner[name]'.
* We assume empty values are an attempt to unset a parameter;
* however 'owner[name]' cannot be unset.
* You should remove 'owner[name]' from your request or supply a non-empty value.»
* https://mage2.pro/t/5011
* To evade such failure, I have added df.clean() to the whole `owner` object (see above).
*/
,name: this.cardholder()
/**
Expand All @@ -498,7 +514,7 @@ return parent.extend({
* String, optional.
*/
,phone: this._pPhone()
}
})
/**
* 2017-10-20 «Stripe API Reference» → «Create a source» → «redirect».
* «Parameters required for the redirect flow.
Expand Down

0 comments on commit f8ce93e

Please sign in to comment.