44
55use  Omnipay \Common \Exception \InvalidRequestException ;
66use  Omnipay \NewebPay \Traits \HasDefaults ;
7+ use  Omnipay \NewebPay \Traits \HasPaymentInfo ;
78
89class  PurchaseRequest extends  AbstractRequest
910{
1011    use  HasDefaults;
12+     use  HasPaymentInfo;
1113
1214    public  function  getEndpoint ()
1315    {
@@ -119,15 +121,15 @@ public function getExpireDate()
119121     */ 
120122    public  function  setCustomerURL ($ value )
121123    {
122-         return  $ this  ->setParameter ( ' CustomerURL ' ,  $ value );
124+         return  $ this  ->setPaymentInfoUrl ( $ value );
123125    }
124126
125127    /** 
126128     * @return ?string 
127129     */ 
128130    public  function  getCustomerURL ()
129131    {
130-         return  $ this  ->getParameter ( ' CustomerURL '  );
132+         return  $ this  ->getPaymentInfoUrl ( );
131133    }
132134
133135    /** 
@@ -905,19 +907,6 @@ public function getTokenTermDemand()
905907        return  $ this  ->getParameter ('TokenTermDemand ' );
906908    }
907909
908-     public  function  setPaymentInfoUrl ($ value )
909-     {
910-         return  $ this  ->setCustomerURL ($ value );
911-     }
912- 
913-     /** 
914-      * @return ?string 
915-      */ 
916-     public  function  getPaymentInfoUrl ()
917-     {
918-         return  $ this  ->getCustomerURL ();
919-     }
920- 
921910    /** 
922911     * @throws InvalidRequestException 
923912     */ 
@@ -938,7 +927,7 @@ public function getData(): array
938927            'ExpireDate '  => $ this  ->getExpireDate (),
939928            'ReturnURL '  => $ this  ->getReturnUrl (),
940929            'NotifyURL '  => $ this  ->getNotifyUrl (),
941-             'CustomerURL '  => $ this  ->getCustomerURL (),
930+             'CustomerURL '  => $ this  ->getPaymentInfoUrl (),
942931            'ClientBackURL '  => $ this  ->getCancelUrl (),
943932            'Email '  => $ this  ->getEmail (),
944933            'EmailModify '  => $ this  ->getEmailModify (),
0 commit comments