Alipay is one of the leading third-party service payment provider in China, with more
than 450 million active users. One method of accepting Alipay as an alternative payment method
is through the PayClient Library. Make sure to also make yourself familiar with the general
implementation of the PayClient library.
You can enable Alipay through the PayClient
Library. Your merchants can then accept Alipay digital wallet payments by scanning the
customer's code with your external barcode scanner as shown below in the workflow.
To accept Alipay as an alternative payment method:
Create
AccountParameters
with
.wallet()
,
alipay()
and
shopperAccountIdentifier()
, which
will result from the code scanned from the customer’s Alipay mobile app.
Pass the account parameters to
InteractiveProcess
:
var transactionParameters = new TransactionParameters.Builder()
.Charge(amount, SelectedCurrency)
.Workflow(TransactionWorkflowType.ALTERNATIVE_PAYMENT_METHOD)
.Subject("Hey World!")
.CustomIdentifier("payClientTesterTransaction")
.AutoCapture(AutoCapture)
.Build();
AccountParameters accountParameters = new AccountParameters.Builder().Wallet().Alipay().ShopperAccountIdentifier(PaymentDetailsSource.QR_CODE, “aaaa”).Build();
InteractiveProcess = PosClient.GetTransactionModule()
.StartTransaction(transactionParamerters, accountParameters, (transaction, transactionProcessDetails, abortable) => {}, (transaction, transactionProcessDetails, error) => {});