Accepting Alipay
Alipay is one of the leading third-party service payment provider in China. With more than 450M active users, your merchants can accept Alipay wallet payments by selecting it as payment method and scanning the customer's code with a device's camera.
The PayButton conveniently includes scanning functionalities so you do not need to integrate them. Examples of PayButton screens are shown below.
To accept Alipay as an alternative payment method:
Set
Card
or
WalletAlipay
, or both as payment method configuration in
.setPaymentMethods()
.
Create
TransactionParameters
.
Provide the the parameters to
createTransactionIntent
:
// Card and Alipay transactions
MposUi.getInitializedInstance().getConfiguration().setPaymentOptions(EnumSet.of(MposUiConfiguration.PaymentOption.CARD, MposUiConfiguration.PaymentOption.WALLET_ALIPAY));
// Alipay only transactions
MposUi.getInitializedInstance().getConfiguration().setPaymentOptions(EnumSet.of(MposUiConfiguration.PaymentOption.WALLET_ALIPAY));
TransactionParameters params = new TransactionParameters.Builder()
.charge(new BigDecimal(amount), Currency.EUR)
.build();
Intent intent = MposUi.getInitializedInstance().createTransactionIntent(params);
startActivityForResult(intent, MposUi.REQUEST_CODE_PAYMENT);
To generate custom receipts, make sure you are familiar with our
custom receipt functionality.