99 * Authorize.Net DPM Complete Authorize Response
1010 * This is the result of handling the callback.
1111 * The result will always be a HTML redirect snippet. This gets
12- * returned to the gateway, displayed in the user's browser, and a GET
13- * redirect is performed using JavaScript and meta refresh (belt and braces ).
12+ * returned to the gateway, displayed in the user's browser, and a
13+ * redirect is performed using JavaScript and meta refresh (for backup ).
1414 * We may want to return to the success page, the failed page or the retry
15- * page (so the user can correct the form).
15+ * page (so the user can correct the form to try again ).
1616 */
1717class DPMCompleteResponse extends SIMCompleteAuthorizeResponse implements RedirectResponseInterface
1818{
@@ -35,11 +35,6 @@ public function isError()
3535 return isset ($ this ->data ['x_response_code ' ]) && static ::RESPONSE_CODE_ERROR === $ this ->data ['x_response_code ' ];
3636 }
3737
38- public function getMessage ()
39- {
40- return parent ::getReasonCode () . '| ' . parent ::getMessage ();
41- }
42-
4338 /**
4439 * We are in the callback, and we MUST return a HTML fragment to do a redirect.
4540 * All headers we may return are discarded by the gateway, so we cannot use
@@ -51,11 +46,10 @@ public function isRedirect()
5146 }
5247
5348 /**
54- * We default here to POST because the default redirect mechanism
55- * in Omnipay Common only generates a HTML snippet for POST and not
56- * GET.
57- * TODO: We could fix that here so both GET and POST can be supported.
58- * Our fix should also include the "form data" with the URL.
49+ * We set POST because the default redirect mechanism in Omnipay Common only
50+ * generates a HTML snippet for POST and not for the GET method.
51+ * The redirect method is actually "HTML", where a HTML page is supplied
52+ * to do a redirect using any method it likes.
5953 */
6054 public function getRedirectMethod ()
6155 {
@@ -66,7 +60,7 @@ public function getRedirectMethod()
6660 * We probably do not require any redirect data, if the incomplete transaction
6761 * is still in the user's session and we can inspect the results from the saved
6862 * transaction in the database. We cannot send the result through the redirect
69- * unless it is hashed in some way so the authorisation result cannot be faked.
63+ * unless it is hashed so the authorisation result cannot be faked.
7064 */
7165 public function getRedirectData ()
7266 {
@@ -75,9 +69,6 @@ public function getRedirectData()
7569
7670 /**
7771 * The cancel URL is never handled here - that is a direct link from the gateway.
78- * The best approach is to have just one redirect URL, and once there, check the
79- * result of the authorisation in the database (assuming it has been saved in the
80- * callback) and take action from there.
8172 */
8273 public function getRedirectUrl ()
8374 {
0 commit comments