Ionic - On IOS, Stripe payment button is hidden by the keyboard

橙三吉。 提交于 2019-12-23 23:07:40

问题


My app integrates with Stripe for payment purpose, but I have an issue on IOS... People can't pay.

The payment button is hovered over by the keyboard, and there is no button to close it like there is on Android.

I can't succeed into making the popup scroll either.

I'm using custom integration and didn't find anything to help me... Other than making everything from scratch with a custom modal and custom form. And I really don't want to do that.

You can see the tiny top line of the blue button under the keyboard... That's what we want to click !


回答1:


Is that in a webview? Stripe doesn't always work the way you'd expect in a webview. You might need to build your form with Elements rather than Checkout.




回答2:


Install cordova keyboard plugin and in you app.component.ts add this:

this.platform.ready().then(() => {
  ...
  this.keyboard.hideFormAccessoryBar(false); // Hide the keyboard accessory bar with the next, previous and done buttons.
  ...
});

Then when the keyboard show up you will have a nice "Done" option to close it. This should help your customer to finalize payment.



来源:https://stackoverflow.com/questions/55651617/ionic-on-ios-stripe-payment-button-is-hidden-by-the-keyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!