petshop-05-checks.spp
petshop/payment/petshop-05-checks.spp
Download original file · Petstore source contents
1domain petshop;23atomic check checkPaymentEligibility(Buyer, ShopOrder) {4require(shopOrder.status == OrderStatus.UNPAID, RejectionCode.ORDER_NOT_PAYABLE);5require(buyer.wallet >= shopOrder.total, RejectionCode.INSUFFICIENT_FUNDS);6}