File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Omnipay \AuthorizeNet \Message ;
4+
5+ /**
6+ * Request to delete a customer payment profile for an existing customer and existing payment profile.
7+ */
8+ class CIMDeletePaymentProfileRequest extends CIMCreatePaymentProfileRequest
9+ {
10+ protected $ requestType = 'deleteCustomerPaymentProfileRequest ' ;
11+
12+ public function getData ()
13+ {
14+ $ this ->validate ('customerProfileId ' , 'customerPaymentProfileId ' );
15+
16+ $ data = $ this ->getBaseData ();
17+ $ data ->customerProfileId = $ this ->getCustomerProfileId ();
18+ $ data ->customerPaymentProfileId = $ this ->getCustomerPaymentProfileId ();
19+
20+ return $ data ;
21+ }
22+
23+ public function sendData ($ data )
24+ {
25+ $ headers = array ('Content-Type ' => 'text/xml; charset=utf-8 ' );
26+ $ data = $ data ->saveXml ();
27+ $ httpResponse = $ this ->httpClient ->post ($ this ->getEndpoint (), $ headers , $ data )->send ();
28+
29+ return $ this ->response = new CIMDeletePaymentProfileResponse ($ this , $ httpResponse ->getBody ());
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments