This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//End of printing process | |
let completion: PrintCompletion = { (printStatusOK: Bool, error: Error?) in | |
//printStatusOK is true if printing ended with OK status | |
} | |
let progress: PrinterStateUpdate = { (printProgress: WDPrinterStateUpdate) in | |
//printProgress - print progress Initialisation | Printing | Finished | |
} | |
//Discover active devices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.jakewharton.rxrelay2.BehaviorRelay; | |
import com.jakewharton.rxrelay2.Relay; | |
import java.math.BigDecimal; | |
import java.util.ArrayList; | |
import java.util.Currency; | |
import java.util.List; | |
import de.wirecard.epos.model.sale.builder.payment.CardPurchasePayment; | |
import de.wirecard.epos.model.sale.sales.SaleItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.jakewharton.rxrelay2.BehaviorRelay; | |
import com.jakewharton.rxrelay2.Relay; | |
import java.math.BigDecimal; | |
import java.util.ArrayList; | |
import java.util.List; | |
import de.wirecard.epos.model.sale.builder.PurchaseRequest; | |
import de.wirecard.epos.model.sale.builder.payment.EftCardPurchasePayment; | |
import de.wirecard.epos.model.sale.sales.SaleItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//build.gradle (Project: ...) | |
allprojects { | |
repositories { | |
maven { url "https://jitpack.io" } | |
maven { url "https://dl.bintray.com/wirecardmobileservices/Wirecard-ePOS" } | |
} | |
} | |
//build.gradle (Module: ...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.annimon.stream.Collectors; | |
import com.annimon.stream.Stream; | |
import java.math.BigDecimal; | |
import java.math.RoundingMode; | |
import java.util.ArrayList; | |
import java.util.Currency; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Locale; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import SDK module | |
import WDePOS | |
//End of SDK setup process | |
let setupCompletion:CurrentUserCompletion = {( currentUser:WDMerchantUser?, cashier:WDMerchantCashier? , error:Error?) in | |
//Current User is returned upon successful login | |
//if the Cash Management is enabled and Cashier record exist for the current user then the Cashier is returned also | |
} | |
// The SDK is initialized as shared instance so can be accessed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I - Full Return | |
// End of Return process | |
let fullReturnCompletion: SaleUpdateCompletion = { (sale: WDSaleResponse?, error: Error?) in | |
// sale - refunded sale detail | |
// error - if encountered during the Refund process | |
} | |
let saleReturn: WDSaleRequest! = sale.saleReturn()// Here we created the full Sale Return | |
// Alternatively you would create the Sale Return consisting only of Items you wish to Return - aka Partial Return. See at the end | |
// Perform the Refund |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I - QUERY OF SALES | |
// End of Sale Query process | |
let completion: SaleQueryResponse! = { (sales: [WDSaleResponse]?, error: Error?) in | |
// sales list of WDSaleResponse objects | |
// SaleResponse has all the details of the performed Sale including | |
// - Transaction details (CARD | COUPON | CASH) | |
// - Basket details | |
} | |
// Query parameters such as paging, order by, sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//I - QUERY OF SALES | |
// End of Sale Query process | |
SaleQueryResponse completion = ^(NSArray <WDSaleResponse *> * _Nullable sales, NSError * _Nullable error){ | |
// sales list of WDSaleResponse objects | |
// SaleResponse has all the details of the performed Sale including | |
// - Transaction details (CARD | COUPON | CASH) | |
// - Basket details | |
}; | |
// Query parameters such as paging, order by, sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// End of Send Receipt process | |
let completion: SendReceiptCompletion = { (recipient: Array?, error: Error?) in | |
guard error != nil else { | |
//Failure sending the receipt | |
return | |
} | |
//Receipt sent successfully | |
} | |
// Sale manager to generate and send the receipt from the backend to the cardholder |
NewerOlder