buckaroo-it/BuckarooSDK_PHP

Issue with using 'pushURL' and 'additionalParameters' parameters

Closed this issue · 6 comments

Hello.

During creating an encrypted payment I'm trying to do two things: to override default push url and to pass some additional custom parameters (which I expect to receive on my endpoint).

Here is the code I'm using:

$response = $this->api->method('creditcard')->payEncrypted([
  'currency' => 'EUR',
  'amountDebit' => '10.00',
  'invoice' => 'INV-0012345',
  'name' => 'mastercard',
  'encryptedCardData' => $credit_card,
  'returnURL' => 'https://mysite.loc/order/0012345',
  'pushURL' => 'https://mysite.loc/json/buckaroo',
  'additionalParameters' => [
    'Name' => 'paymentGateway',
    'Value' => 'mastercard_buckaroo',
  ],
]);

The problem is that 'pushURL' and 'additionalParameters' parameters doesn't work. However, the similar to 'pushURL' parameter 'returnURL' one works as expected. This is strange.

As specified in documentation, PushURL "overrides all the push URLs as configured in the payment plaza under websites for the associated website key" but this doesn't happen. I'm receiving all the time the request to the URL specified in Plaza.

Could you please clarify this?

Thank you!

Dear @reflie-nxte

Try the additionalParameters like this

$response = $this->api->method('creditcard')->payEncrypted([
  'currency' => 'EUR',
  'amountDebit' => '10.00',
  'invoice' => 'INV-0012345',
  'name' => 'mastercard',
  'encryptedCardData' => $credit_card,
  'returnURL' => 'https://mysite.loc/order/0012345',
  'pushURL' => 'https://mysite.loc/json/buckaroo',
  'additionalParameters' => [
    'paymentGateway' => 'mastercard_buckaroo'
  ],
]);

The push URL should be working like this. Can you check the transaction in Plaza if there is any call made to the push URL?

Also, it's a local URL so our server won't reach your destination. (https://mysite.loc/json/buckaroo)

Dead @ShuCh3n.

Thank you for quick reply. I tried mentioned syntax for 'additionalParameters' but it doesn't work.

The 'push URL' doesn't work too. It doesn't matter which URL I provide there. All the time it does send push data to the one specified in Plaza. But there is one interesting thing: if I provide it like this: 'pushURL' - I do not receive reply at all. However, using next syntax: 'PushURL' I receive reply on the URL specified in Plaza, not provided with this parameter.

Here is which data I receive on the endpoint specified in Plaza after successful credit card transaction:

image

As you can see, there is are no 'AdditionalParameters'. However, in the post request I provided both: 'PushURL' and 'AdditionalParameters', but they didn't work.

Also, it's a local URL so our server won't reach your destination. (https://mysite.loc/json/buckaroo)
This was just an example. Could you please check if these parameters works for you? This looks like some global issue.

Maybe there are some additional settings in the Plaza that can affect this functionality?

Dear @reflie-nxte

Alright, I can confirm that the AdditionalParameters are not working on the master branch, I remembered that we added this recently, but we didn't release this version. This week we will release a new version.

But the pushURL does work, base on your transaction number, I can see that the pushurl you sent to us is empty.

Try to work on the dev branch for now.

We just release v1.3.0 you can update through composer

Great. Thank you. I will try it and I will let you know about results.

Hi @ShuCh3n. All works as expected. PushIRL didn't work initially because it requires having local machine available from the web. I tried to use it thru ngrock and it started working as expected.