[transactionProvider sendCustomerReceiptForTransactionIdentifier:@"transactionIdentifer" emailAddress:@"[email protected]" completed:^(NSString *transactionIdentifier, NSString *emailAddress, NSError *error) { if(!error) { // Receipt successfully sent! } }]; emailAddress:@"[email protected]" completed:^(NSString *transactionIdentifier, NSString *emailAddress, NSError *error) { if(!error) { // Receipt successfully sent! } }];
MPPrintingProcess *process = [transactionProvider printCustomerReceiptForTransactionIdentifier:@"transactionIdentifer" usingAccessory:MPAccessoryFamilySewoo statusChanged:^(MPPrintingProcess *printingProcess, MPTransaction *transaction, MPPrintingProcessDetails *details) { NSLog(@"%@\n%@", details.information[0], details.information[1]); } completed:^(MPPrintingProcess *printingProcess, MPTransaction *transaction, MPPrintingProcessDetails *details) { if (details.state == MPPrintingProcessDetailsStateSentToPrinter) { // Show to the merchant, that printing was successful // and close the printing UI } else { // Allow your merchant to retry printing } }];
transactionProvider.getTransactionModule().sendCustomerReceiptForTransaction( "transactionIdentifer", "[email protected]", new SendReceiptListener() { @Override public void onCompleted(String transactionIdentifier, MposError error) { if(!error) { // Receipt successfully sent! System.out.println("Sent!"); } } } );
PrintingProcess process = transactionProvider.printCustomerReceiptForTransaction( "transactionIdentifer", AccessoryFamily.SEWOO, new PrintingProcessListener() { @Override public void onStatusChanged(PrintingProcess printingProcess, PrintingProcessDetails printingProcessDetails) { abortButton.setVisibility(printingProcess.canAbort() ? View.VISIBLE : View.INVISIBLE); Log.d("mpos", "status changed: " + Arrays.toString(printingProcessDetails.getInformation())); } @Override public void onCompleted(PrintingProcess printingProcess, PrintingProcessDetails printingProcessDetails) { if (printingProcessDetails.getState() == PrintingProcessDetailsState.SENT_TO_PRINTER) { // Show to the merchant, that printing was successful // and close the printing UI } else { // Allow your merchant to retry printing } } } );