MPTransactionProcessTippingStepParameters *params = [MPTransactionProcessTippingStepParameters tippingAmountParametersWithOptionalsBlock: ^(id<MPTransactionProcessTippingAmountStepParametersOptionals> _Nonnull optionals) { [optionals setShowConfirmationScreen:YES]; [optionals setFormatWithIntegerDigits:6 fractionDigits:2]; }]; MPTransactionProcessParameters *pp = [MPTransactionProcessParameters parametersWithSteps: ^(id<MPTransactionProcessParametersSteps> steps) { [steps setTippingStepParameters:params]; }]; MPTransactionProcess *process = [transactionProvider startTransactionWithParameters:transactionParameters accessoryParameters:accessoryParametersprocessParameters:pp registered:/*...*/ statusChanged:/*...*/ actionRequired:/*...*/ completed:/*...*/];
MPTransactionProcessTippingStepParameters *params = [MPTransactionProcessTippingStepParameters tippingTotaltParametersWithOptionalsBlock: ^(id<MPTransactionProcessTippingTotalStepParametersOptionals> _Nonnull optionals) { [optionals setShowConfirmationScreen:NO]; [optionals setFormatWithIntegerDigits:6 fractionDigits:2]; }]; MPTransactionProcessParameters *pp = [MPTransactionProcessParameters parametersWithSteps: ^(id<MPTransactionProcessParametersSteps> steps) { [steps setTippingStepParameters:params]; }]; MPTransactionProcess *process = [transactionProvider startTransactionWithParameters:transactionParameters accessoryParameters:accessoryParametersprocessParameters:pp registered:/*...*/ statusChanged:/*...*/ actionRequired:/*...*/ completed:/*...*/];
NSLog(@"Included Tip: %@",transaction.details.includedTipAmount);
TippingProcessStepParameters steps = new TippingProcessStepParameters.Builder() .askForTipAmount() .showConfirmationScreen(true) .numberFormat(6, 2).build(); TransactionProcessParameters transactionProcessParameters = new TransactionProcessParameters.Builder() .addStep(steps) .build(); TransactionProcess paymentProcess = transactionProvider.startTransaction(transactionParameters, accessoryParameters,transactionProcessParameters, this);
TippingProcessStepParameters steps = new TippingProcessStepParameters.Builder() .askForTotalAmount() .showConfirmationScreen(false) .numberFormat(6, 2).build(); TransactionProcessParameters transactionProcessParameters = new TransactionProcessParameters.Builder() .addStep(steps) .build(); TransactionProcess paymentProcess = transactionProvider.startTransaction(transactionParameters, accessoryParameters,transactionProcessParameters, this);
System.out.println("Included Tip: " + transaction.getDetails().getIncludedTipAmount());