正在抛出以下例外
无效请求:没有此类令牌
我的代码
abstract class Base<T extends Base<T>> {
protected final Base<T> getOp1() {
return condition() ? getNewInstance() : this;
}
protected abstract Base<T> getNewInstance();
public abstract Base<T> combine(T other);
}
class Variant<T extends Variant<T>> extends Base<T> {
protected Base<T> getNewInstance() {
return new Variant();
}
public Base<T> combine(T op2) {
Variant<T> op1 = (Variant<T>) getOp1(); // <- explicit cast
op1.calculate(op2);
return op1;
}
private void calculate(Base<T> other) {
// ...
}
}
请注意 -
final Map<String, Object> chargeParams = new HashMap<String, Object>();
chargeParams.put("amount", 200);
chargeParams.put("currency", "usd");
chargeParams.put("card", cardParams);
System.out.println(Token.retrieve(stripeToken));
chargeParams.put("source",Token.retrieve(stripeToken));
charge = Charge.create(chargeParams);
与代码中的token-id
匹配。test-public
和test-private
密钥。