Java Stripe API -


i'm trying bind token customer card. so, token has been created stripe.js. so, send code on backend service , i'm trying set customer's cards:

card card = token.retrieve(id).getcard(); 

so, once i've got token card, i'm trying it:

customer.retrieve(this.customer).getsources().create(card.getmetadata()) 

nevertheless, i'm getting compilation error:

the method create(map) in type externalaccountcollection not applicable arguments (map)

any ideas?

you can find documentation adding card existing customer object here: https://stripe.com/docs/api/java#create_card.

the correct code be:

customer customer = customer.retrieve(this.customer); map<string, object> params = new hashmap<string, object>(); params.put("source", id); card card = customer.getsources().create(params); 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -