[英]Set amount in Stripe Integration
I am working on Stripe payment in objectiveC. 我正在ObjectiveC中进行条纹付款。 I have set cvc, account number etc in the CheckoutVC.m view controller. 我已经在CheckoutVC.m视图控制器中设置了cvc,帐号等。
- (STPCardParams *)getCardParams {
STPCardParams *cardParams = [[STPCardParams alloc] init];
NSArray *dateCoponents = [txtExpirationDate.text componentsSeparatedByString:@"/"];
cardParams.number = txtCreditCardNo.text;
cardParams.expMonth = [(NSString *)[dateCoponents firstObject] integerValue];
cardParams.expYear = [(NSString *)[dateCoponents lastObject] integerValue];
cardParams.cvc = txtCvv.text;
return cardParams;
}
My issue that how can i set amount $10. 我的问题是,我该如何设置10美元。 Can anybody help me. 有谁能够帮助我。
You can pass amount with your web service/api 您可以通过Web服务/ API传递金额
Refer this link step by step, http://www.appcoda.com/ios-stripe-payment-integration/ 逐步参考此链接, http://www.appcoda.com/ios-stripe-payment-integration/
you will find postStripeToken() function, under which you can see amount parameter passed. 您会发现postStripeToken()函数,在该函数下您可以看到传递的数量参数。
let params = ["stripeToken": token.tokenId,
**"amount": self.amountTextField.text.toInt()!,**
"currency": "usd",
"description": self.emailTextField.text]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.