Search Engine: Elastic

Article ID: 130886, created on May 29, 2017, last review on Mar 14, 2018

  • Applies to:
  • Business Automation 7.0
  • Business Automation 7.1
  • Business Automation 7.2
  • Business Automation 7.3

Question

As described in the documentation system parameters are used in payment plugin:

return_url_ok
return_url_failed

How and where these environment parameters can be configured in BA Payment PHP plugin?

Resolution

These parameters are internal and cannot be configured manually. You can get them from the plugin, if required, e.g. $params['environment']['notify_url']

In the control panel (e.g. placing a payment from PCP) they are automatically generated like this:

"return_url_ok":"https://<ba_hostname>/bss-www/nologin/srv/BM/JsonRedirectPaymentOk/swep/action/return/EActivityID/<ID>/"
"notify_url":"https://<ba_hostname>/bss-www/nologin/srv/BM/ProcessNotificationJsonPlugin/swep/action/notify/EActivityID/<ID>/"

If you are using API or custom on-line store, then the parameters must be passed additionally in PlaceOrderAndAuthorize_API call - refer to description in the documentation.

originUrl – mandatory parameter; URL of the payment originator;

callbackUrl – mandatory parameter; URL to return to with any status (some payment systems do not respond statuses on return, just transaction identifiers). To process the response, the JsonRedirectPayment_API method must be called next to process the data received in HTTP response;

callbackUrl3D – mandatory parameter; URL to handle responses from 3D-Secure gateway. To process the response, the JsonCallback3D_API method must be called next;

callbackUrlOk – mandatory parameter; URL to return with success status. To process the response, the JsonRedirectPayment_API method must be called next with returnResult='ok' and HTTP data;

callbackUrlFail – mandatory parameter; URL to return with fail status. To process the response, the JsonRedirectPayment_API method must be called next with returnResult='fail' and HTTP data;

notifyUrl – mandatory parameter; URL to handle server-to-server notifications. To process the response, the JsonRedirectNotify_API method must be called next.

See the example of how these URLs are generated in the Custom Online Store:

$baseUrl = "https://my-custom-store/callback.php";;
$PayToolData['originUrl']       =  $baseUrl;
$PayToolData['callbackUrl']     = "$baseUrl/{docId}/callback";
$PayToolData['callbackUrl3D']   = "$baseUrl/{docId}/3dsecure";
$PayToolData['callbackUrlOk']   = "$baseUrl/{docId}/ok/callback";
$PayToolData['callbackUrlFail'] = "$baseUrl/{docId}/fail/callback";
$PayToolData['notifyUrl']       = "$baseUrl/{docId}/notify";

where {docId} is a placeholder for transaction ID.

baseUrl is store url, depending on the parameter sent, the method is to be called, e.g. if that is notifyUrl then there must be something that triggers JsonRedirectNotify_API, etc.

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 c0f836394088a28cc30dd0e5fe8b600e b2c3b33425dfc50c7d41a2efaa7f84f3 1def515ca613a5505aa21a4affa96e6b ef171e3fccb12bd8e09076a7b49212c0 7c0b495571a6c1bec50e4f324a20ec14

Email subscription for changes to this article
Save as PDF