Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updates to payment profiles, add bitcoin profile

  • Loading branch information...
commit 8a26ed8acadf00b80d73e05d762b40f63a381306 1 parent 9356642
Richard Shank authored March 15, 2013
90  lib/Vespolina/Entity/Partner/PaymentProfile.php
@@ -6,48 +6,34 @@
6 6
 
7 7
 class PaymentProfile implements PaymentProfileInterface
8 8
 {
9  
-    const PAYMENT_PROFILE_TYPE_CREDIT_CARD = 'Credit Card';
10  
-    const PAYMENT_PROFILE_TYPE_INVOICE = 'Invoice';
11  
-
12  
-    public static $validTypes = array(
13  
-        self::PAYMENT_PROFILE_TYPE_CREDIT_CARD,
14  
-        self::PAYMENT_PROFILE_TYPE_INVOICE,
15  
-    );
16  
-
17 9
     protected $id;
18 10
     protected $reference;
19 11
     protected $partner;
20  
-    protected $billingCity;
21  
-    protected $billingCountry;
22  
-    protected $billingState;
23  
-    protected $billingAddress;
24  
-    protected $billingZipCode;
25  
-    protected $billingPhone;
26 12
 
27 13
     /**
28 14
      * @inheritdoc
29 15
      */
30  
-    public function setPartner(PartnerInterface $partner)
  16
+    public function getId()
31 17
     {
32  
-        $this->partner = $partner;
33  
-
34  
-        return $this;
  18
+        return $this->id;
35 19
     }
36 20
 
37 21
     /**
38 22
      * @inheritdoc
39 23
      */
40  
-    public function getPartner()
  24
+    public function setPartner(PartnerInterface $partner)
41 25
     {
42  
-        return $this->partner;
  26
+        $this->partner = $partner;
  27
+
  28
+        return $this;
43 29
     }
44 30
 
45 31
     /**
46 32
      * @inheritdoc
47 33
      */
48  
-    public function getId()
  34
+    public function getPartner()
49 35
     {
50  
-        return $this->id;
  36
+        return $this->partner;
51 37
     }
52 38
 
53 39
     /**
@@ -67,64 +53,4 @@ public function getReference()
67 53
     {
68 54
         return $this->reference;
69 55
     }
70  
-
71  
-    public function setBillingAddress($billingAddress)
72  
-    {
73  
-        $this->billingAddress = $billingAddress;
74  
-    }
75  
-
76  
-    public function getBillingAddress()
77  
-    {
78  
-        return $this->billingAddress;
79  
-    }
80  
-
81  
-    public function setBillingZipCode($billingZipCode)
82  
-    {
83  
-        $this->billingZipCode = $billingZipCode;
84  
-    }
85  
-
86  
-    public function getBillingZipCode()
87  
-    {
88  
-        return $this->billingZipCode;
89  
-    }
90  
-
91  
-    public function setBillingCity($billingCity)
92  
-    {
93  
-        $this->billingCity = $billingCity;
94  
-    }
95  
-
96  
-    public function getBillingCity()
97  
-    {
98  
-        return $this->billingCity;
99  
-    }
100  
-
101  
-    public function setBillingCountry($billingCountry)
102  
-    {
103  
-        $this->billingCountry = $billingCountry;
104  
-    }
105  
-
106  
-    public function getBillingCountry()
107  
-    {
108  
-        return $this->billingCountry;
109  
-    }
110  
-
111  
-    public function setBillingPhone($billingPhone)
112  
-    {
113  
-        $this->billingPhone = $billingPhone;
114  
-    }
115  
-
116  
-    public function getBillingPhone()
117  
-    {
118  
-        return $this->billingPhone;
119  
-    }
120  
-
121  
-    public function setBillingState($billingState)
122  
-    {
123  
-        $this->billingState = $billingState;
124  
-    }
125  
-
126  
-    public function getBillingState()
127  
-    {
128  
-        return $this->billingState;
129  
-    }
130 56
 }
13  lib/Vespolina/Entity/Partner/PaymentProfile/Bitcoin.php
... ...
@@ -0,0 +1,13 @@
  1
+<?php
  2
+
  3
+namespace Vespolina\Entity\Partner\PaymentProfile;
  4
+
  5
+use Vespolina\Entity\Partner\PaymentProfile;
  6
+
  7
+class Bitcoin extends PaymentProfile
  8
+{
  9
+    public function getType()
  10
+    {
  11
+        return 'bitcoin';
  12
+    }
  13
+}
4  .../Entity/Partner/PaymentProfileType/CreditCard.php → ...lina/Entity/Partner/PaymentProfile/CreditCard.php
... ...
@@ -1,10 +1,10 @@
1 1
 <?php
2 2
 
3  
-namespace Vespolina\Entity\Partner\PaymentProfileType;
  3
+namespace Vespolina\Entity\Partner\PaymentProfile;
4 4
 
5 5
 use Vespolina\Entity\Partner\PaymentProfile;
6 6
 
7  
-class CreditCard extends PaymentProfile implements PaymentProfileTypeInterface
  7
+class CreditCard extends PaymentProfile
8 8
 {
9 9
     protected $activeCardNumber;
10 10
     protected $cardType;
13  lib/Vespolina/Entity/Partner/PaymentProfile/Invoice.php
... ...
@@ -0,0 +1,13 @@
  1
+<?php
  2
+
  3
+namespace Vespolina\Entity\Partner\PaymentProfile;
  4
+
  5
+use Vespolina\Entity\Partner\PaymentProfile;
  6
+
  7
+class Invoice extends PaymentProfile
  8
+{
  9
+    public function getType()
  10
+    {
  11
+        return 'Invoice';
  12
+    }
  13
+}
4  lib/Vespolina/Entity/Partner/PaymentProfileInterface.php
@@ -6,12 +6,12 @@
6 6
 
7 7
 interface PaymentProfileInterface
8 8
 {
  9
+    function getId();
  10
+
9 11
     function setPartner(PartnerInterface $partner);
10 12
 
11 13
     function getPartner();
12 14
 
13  
-    function getId();
14  
-
15 15
     function setReference($reference);
16 16
 
17 17
     function getReference();
13  lib/Vespolina/Entity/Partner/PaymentProfileType/Invoice.php
... ...
@@ -1,13 +0,0 @@
1  
-<?php
2  
-
3  
-namespace Vespolina\Entity\Partner\PaymentProfileType;
4  
-
5  
-use Vespolina\Entity\Partner\PaymentProfile;
6  
-
7  
-class Invoice extends PaymentProfile implements PaymentProfileTypeInterface
8  
-{
9  
-    public function getType()
10  
-    {
11  
-        return 'Invoice';
12  
-    }
13  
-}
8  lib/Vespolina/Entity/Partner/PaymentProfileType/PaymentProfileTypeInterface.php
... ...
@@ -1,8 +0,0 @@
1  
-<?php
2  
-
3  
-namespace Vespolina\Entity\Partner\PaymentProfileType;
4  
-
5  
-interface PaymentProfileTypeInterface
6  
-{
7  
-    function getType();
8  
-}

0 notes on commit 8a26ed8

Please sign in to comment.
Something went wrong with that request. Please try again.