Skip to content

Commit 48ab72b

Browse files
committed
Fixed an error when changing a stored address
1 parent 2735fbe commit 48ab72b

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ Test cards can be located here: https://stripe.com/docs/testing
1919
When a order is complete, it can be viewed in admin with shipping details and completion status.
2020

2121
##Changelog
22+
### [1.0.6] - 2016-08-24
23+
#### Fixed
24+
- Fixed an error when changing a stored address
25+
2226
### [1.0.5] - 2016-08-24
2327
#### Added
2428
- Improved error handling when using wrong card input
@@ -51,9 +55,6 @@ When a order is complete, it can be viewed in admin with shipping details and co
5155
- Cart connection from Order
5256
- Stripe API-keys from import
5357

54-
##Known issues
55-
- Changing a stored address gives payment error on the first payment
56-
attempt. The second attempt stores the address and completes the payment
5758

5859
##Roadmap
5960

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Project settings
33
#
44
group = no.iskald
5-
version = 1.0.5
5+
version = 1.0.6
66
projectName = store
77
appName = no.iskald.payup
88
displayName = PayUp! Store

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "payup",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "",
55
"scripts": {
66
"build": "./gradlew build",

src/main/resources/site/lib/contentHelper.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,23 @@ function modifyContent(params) {
8181
if (!params.id) throw "Cannot create content. Missing parameter: id";
8282
if (!params.editor) throw "Cannot create content. Missing parameter: editor";
8383
var branch = contextLib.get().branch;
84-
return contextLib.run({
84+
var modifiedContent;
85+
contextLib.run({
8586
branch: 'draft',
8687
user: {
8788
login: 'su',
8889
userStore: 'system'
8990
}
9091
}, function () {
91-
var c = contentLib.modify({
92+
modifiedContent = contentLib.modify({
9293
key: params.id,
9394
editor: params.editor,
9495
branch: 'draft'
9596
});
96-
publish(c._id, branch);
97+
98+
publish(modifiedContent._id, branch);
9799
});
100+
return modifiedContent;
98101
}
99102

100103
function contentCount(params) {

src/main/resources/site/services/checkout/checkout.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,12 @@ function getShippingDetails(customer) {
8888
function getAddress(customer, data) {
8989
var shippingAddress = {};
9090
if (customer) {
91-
var updatedCustomer = customerLib.updateAddress(customer, data);
92-
shippingAddress.name = updatedCustomer.data.name;
93-
shippingAddress.address = updatedCustomer.data.address;
94-
shippingAddress.zip = updatedCustomer.data.zip;
95-
shippingAddress.city = updatedCustomer.data.city;
96-
} else {
97-
shippingAddress.name = data.name;
98-
shippingAddress.address = data.address;
99-
shippingAddress.zip = data.zip;
100-
shippingAddress.city = data.city;
91+
customerLib.updateAddress(customer, data);
10192
}
93+
shippingAddress.name = data.name;
94+
shippingAddress.address = data.address;
95+
shippingAddress.zip = data.zip;
96+
shippingAddress.city = data.city;
10297

10398
return shippingAddress;
10499
}

0 commit comments

Comments
 (0)