From 21e0785c8308be5acba75738f4379115c3c32b5d Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 11 Jun 2015 10:14:43 +0200 Subject: Working on w16 --- .../src/com/camilstaps/webshop/payment/PayPal.java | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Week16 Webshop/src/com/camilstaps/webshop/payment/PayPal.java (limited to 'Week16 Webshop/src/com/camilstaps/webshop/payment/PayPal.java') diff --git a/Week16 Webshop/src/com/camilstaps/webshop/payment/PayPal.java b/Week16 Webshop/src/com/camilstaps/webshop/payment/PayPal.java new file mode 100644 index 0000000..c893da1 --- /dev/null +++ b/Week16 Webshop/src/com/camilstaps/webshop/payment/PayPal.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2015 Camil Staps + */ +package com.camilstaps.webshop.payment; + +/** + * + * @author camilstaps + */ +public class PayPal implements PaymentMethod { + + private final String email, pass; + + public PayPal(String email, String pass) { + this.email = email; + this.pass = pass; + } + + @Override + public boolean pay(double amount) { + System.out.println("€" + amount + " paid with PayPal:\n" + email + " (" + pass + ")"); + return true; + } + +} -- cgit v1.2.3