def testGetPriceForCustomer(self): """ """ pp = IPaymentPriceManagement(self.shop) price_gross = pp.getPriceGross() self.assertEqual(price_gross, 100.0)
def testGetPriceForCustomer(self): """ """ pp = IPaymentPriceManagement(self.shop) price_gross = pp.getPriceGross() self.assertEqual(price_gross, 100.0)
def getPaymentMethodInfo(self): """ """ # method customer = ICustomerManagement(self.context).getAuthenticatedCustomer() selected_payment_method = customer.selected_payment_method pm = IPaymentMethodManagement(self.context) method = pm.getPaymentMethod(selected_payment_method) # price pp = IPaymentPriceManagement(self.context) payment_price = pp.getPriceGross() cm = ICurrencyManagement(self.context) price = cm.priceToString(payment_price) return { "type" : method.portal_type, "title" : method.Title(), "price" : price, "display" : payment_price != 0, }
def getPaymentMethodInfo(self): """ """ # method customer = ICustomerManagement(self.context).getAuthenticatedCustomer() selected_payment_method = customer.selected_payment_method pm = IPaymentMethodManagement(self.context) method = pm.getPaymentMethod(selected_payment_method) # price pp = IPaymentPriceManagement(self.context) payment_price = pp.getPriceGross() cm = ICurrencyManagement(self.context) price = cm.priceToString(payment_price) return { "type": method.portal_type, "title": method.Title(), "price": price, "display": payment_price != 0, }