diff --git a/example/Component/DirectPayment/index.js b/example/Component/DirectPayment/index.js index d2ac811..244747d 100644 --- a/example/Component/DirectPayment/index.js +++ b/example/Component/DirectPayment/index.js @@ -96,11 +96,11 @@ export default class Component extends React.Component { //addressRequired: false type: 3, cost: 10.00, - street: 'Av João Lima', + street: 'Av Joao Lima', number: 55, complement: 'Casa', district: 'Campeche', - city: 'Florianópolis', + city: 'Florianopolis', state: 'SC', country: 'BRA', postalCode: '88063333' @@ -110,11 +110,11 @@ export default class Component extends React.Component { // Endereço de cobrança billing: { - street: 'Av João Lima', + street: 'Av Joao Lima', number: 55, complement: 'Casa', district: 'Campeche', - city: 'Florianópolis', + city: 'Florianopolis', state: 'SC', country: 'BRA', postalCode: '88063333' @@ -177,6 +177,9 @@ export default class Component extends React.Component { */ onSubmit(data) { + console.log('sending to API...') + console.log(data) + this.setState({ loading: true, error: null, diff --git a/package.json b/package.json index ac51c92..4102eab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pagseguro-react", - "version": "1.0.8", + "version": "1.0.9", "author": "Willy Chagas { if (i.amount.toFixed) { i.amount = i.amount.toFixed(2) diff --git a/src/DirectPayment/index.js b/src/DirectPayment/index.js index a1e970f..873ac32 100644 --- a/src/DirectPayment/index.js +++ b/src/DirectPayment/index.js @@ -200,6 +200,8 @@ export default class Component extends React.Component { newState = { ...newState, ...data } } + console.log(this.state) + this.setState(newState) } @@ -269,7 +271,7 @@ export default class Component extends React.Component { { active == 'payment' && - + }