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
Post a Comment