Commit 256460f8 authored by Nikolai R Kristiansen's avatar Nikolai R Kristiansen

Display detailed stripe charge error messages

parent f4272560
Pipeline #602 failed with stage
in 1 minute and 22 seconds
......@@ -138,7 +138,7 @@ export function requestMembershipCharge(auth_token, stripe_token, membership_typ
dispatch(membershipChargeSuccess(data))
},
data => {
dispatch(membershipChargeFailure(data || {'non_field_errors': ['Kunne ikke belaste kort, prøv igjen']}))
dispatch(membershipChargeFailure(data['detail'] || 'Kunne ikke belaste bankkortet, prøv igjen'))
}
)
}
......
......@@ -36,7 +36,7 @@ class ProofContainer extends Component {
user={this.props.user}
isChargingMembership={this.props.isChargingMembership}
isLoadingMembershipType={this.props.data.loading}
chargeError={this.props.chargeError ? 'Kunne ikke belaste bankkortet, prøv igjen...' : ''}
chargeError={this.props.chargeError ? this.props.chargeError : ''}
onChargePress={this.openStripe}
onLogoutPress={this.props.onLogoutPress}
membershipPrice={this.getPrice(this.props.data.membershipTypes)}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment