Skip to content

Commit cf12bd6

Browse files
committed
Additional fields moved to hidden field list for DPM.
1 parent 6010b7a commit cf12bd6

File tree

3 files changed

+44
-10
lines changed

3 files changed

+44
-10
lines changed

src/Message/AbstractRequest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ public function getDeveloperEndpoint()
7777
return $this->getParameter('developerEndpoint');
7878
}
7979

80+
/**
81+
* Base data used only for the AIM API.
82+
*/
8083
protected function getBaseData()
8184
{
8285
$data = array();

src/Message/DPMResponse.php

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,54 @@ class DPMResponse extends AbstractResponse implements RedirectResponseInterface
1717

1818
/**
1919
* These will be hidden fields in the direct-post form.
20+
* Not all are required
2021
*/
2122
protected $hiddenFields = array(
23+
// Merchant
24+
'x_login',
25+
26+
// Fingerprint
2227
'x_fp_hash',
28+
'x_fp_sequence',
29+
'x_fp_timestamp',
30+
31+
// Transaction
32+
'x_type',
33+
'x_version',
34+
'x_method',
35+
36+
// Payment
2337
'x_amount',
2438
'x_currency_code',
25-
'x_test_request',
26-
'x_cancel_url',
27-
'x_relay_url',
39+
'x_tax',
40+
'x_freight',
41+
'x_duty',
42+
'x_tax_exempt',
43+
44+
// Relay response
2845
'x_relay_response',
29-
'x_show_form',
30-
'x_delim_data',
31-
'x_fp_timestamp',
32-
'x_fp_sequence',
33-
'x_type',
34-
'x_login',
46+
'x_relay_url',
47+
'x_relay_always',
48+
'x_cancel_url',
49+
50+
// AFDS
51+
'x_customer_ip',
52+
53+
// Testing
54+
'x_test_request',
55+
3556
'x_invoice_num',
3657
'x_description',
3758
'x_cust_id',
38-
'x_customer_ip',
59+
'x_email_customer',
60+
61+
'x_delim_data',
62+
);
63+
64+
/**
65+
* Maps OmniPay field names to Authorize.Net field names.
66+
*/
67+
protected $fieldMapping = array(
3968
);
4069

4170
public function __construct(RequestInterface $request, $data, $postUrl)

src/Message/SIMAuthorizeRequest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public function getData()
1616
$data = array();
1717
$data['x_login'] = $this->getApiLoginId();
1818
$data['x_type'] = $this->action;
19+
$data['x_version'] = '3.1';
20+
$data['x_method'] = 'CC';
1921
$data['x_fp_sequence'] = mt_rand();
2022
$data['x_fp_timestamp'] = time();
2123
$data['x_delim_data'] = 'FALSE';

0 commit comments

Comments
 (0)