- Get Started
- Guides
- Integrations
- References
- API Reference
- Basic Payment
- Forex
- Authentication
- Card Account
- Apple Pay
- Virtual Account
- Bank Account
- Token Account
- Customer
- Billing Address
- Merchant Billing Address
- Shipping Address
- Merchant Shipping Address
- Merchant
- Corporate
- Recipient
- Marketplace & Cart
- Airline
- Lodging
- Passenger
- Tokenization
- Recurring Migration
- 3D Secure
- Custom Parameters
- Async Payments
- Job
- Risk
- Response Parameters
- Card On File
- Chargeback
- Result Codes
- Payment Methods
- Transaction Flows
- Regression Testing
- Data Retention Policy
- API Reference
- Support
Mobile Optimization
PayUnity.Flex is optimized for mobile browsers by default. However, if you are creating your own customized style for the payment form, here are some tips.
Enable responsive design in your HTML
Start "mobile first" and enhance your form with Media Queries, in order to build up your mobile styles for wider viewports (such as tablet devices) and high-resolution displays. It's recommended that you adapt these Media Queries based on the content of your site rather than mirroring the fixed dimensions of specific devices. Larger input fields and buttons make usage of your payment form much easier. Apple says that the average finger tap is about 44x44 pixels. Of course, almost all input fields and buttons are larger than 44px. In most cases you need to set only the height. Mobile testing can be difficult and time intensive. With the variety of operating systems and screen sizes, prioritizing by market share and testing at multiple resolutions is important. Getting your hands on a phone for each OS is always best, but not always possible. Some desktop browser plugins, such as 'User Agent Switcher' for Firefox and Chrome, can be an invaluable time-saver for testing. You can simply jump between different OS experiences on your desktop.<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
...
</html>
Start with "mobile first" CSS
/* default value, applies to all devices */
.button {width: 100%}
@media (min-width: 480px) {
/* this rule applies only to devices with a minimum screen width of 480px */
.button {
width: 50%;
}
}
Use large input fields and buttons
.input,
.button {
height: 44px;
width: 100%;
}
Test across systems devices