aboutsummaryrefslogtreecommitdiff
path: root/Week16 Webshop/src/com/camilstaps/webshop/payment/PayPal.java
blob: c893da1435bb20019ed51b394ed64df0c42d5d24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
    }
    
}