Skip to content

Nonce never sends to server #3

@tchaud

Description

@tchaud

Here is the function I've set up, almost identical to the example...
`getNonce: function(){
return(
fetch('http://fryegg.com:3000/get_token')
.then((response) => response.json())
.then((responseData) => {
var clientToken = responseData.clientToken;
BTClient.setup(clientToken);

BTClient.showPaymentViewController(function(err, nonce) {
//callback after the user completes (or cancels) the flow.
//with the nonce, you can now pass it to your server to create a charge against the user's payment method
fetch('http://fryegg.com:3000/pay', {
method: "POST",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({payment_method_nonce: 'fake-valid-nonce'})
}).done();
});

}).done()
);
}`

The nonce is created on the server and sent back, but the POST method is never called from the phone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions