Skip to content

Conversation

ahmedkhan847
Copy link

Add functions which were missing to set success, failure and transfer URL.

@coveralls
Copy link

coveralls commented Mar 11, 2018

Coverage Status

Coverage decreased (-1.6%) to 77.474% when pulling daf7442 on ahmedkhan847:master into 825e937 on dercoder:master.

@dercoder
Copy link
Owner

Thats the wrong place to add them. This functions already exists in:
https://github.com/thephpleague/omnipay-common/blob/master/src/Common/Message/AbstractRequest.php#L551

@ahmedkhan847
Copy link
Author

I was unable to get or set them. I got undefined function error

@dercoder
Copy link
Owner

Pls take a look here: https://github.com/thephpleague/omnipay
All gateway methods except acceptNotification take an $options array as an argument. The acceptNotification method
does not take any parameters and will access the HTTP URL variables or POST data implicitly. Each gateway differs in
which parameters are required, and the gateway will throw InvalidRequestException if you omit any required parameters.
All gateways will accept a subset of these options:

  • card
  • token
  • amount
  • currency
  • description
  • transactionId
  • clientIp
  • returnUrl
  • cancelUrl

Pass the options through to the method like so:

$card = new CreditCard($formData);
$request = $gateway->authorize(array(
    'amount' => '10.00', // this represents $10.00
    'card' => $card,
    'returnUrl' => 'https://www.example.com/return',
));

@ahmedkhan847
Copy link
Author

hey thanks for letting me know I will close this request can you tell me how can I set callbackURL in it?

@dercoder
Copy link
Owner

callbackUrl = notifyUrl

@ahmedkhan847
Copy link
Author

nope not that one. Their is an optional CallBackURL in ecopayz document which tells the transfer is complete or not.

@ahmedkhan847
Copy link
Author

notifyURL is a transferUrl

@dercoder
Copy link
Owner

Why do you need the CallbackUrl? Its not enabled by default and TransferUrl will do the same

TransferUrl URL
Merchant’s Listener URL (used for server to server calls between the Merchant and ecoPayz)

CallbackUrl (Not required) URL
Merchants can receive XML notifications to monitor the final status of purchase transactions automatically via the ‘Callback’ URL.

N.B! This function is not enabled by default. In order to enable ‘Callback’ you have to provide us (technicalsupport@ecopayz.com) with an URL and request activation of this feature for your Merchant account. It can be the same URL as your Listener or a different URL.

@ahmedkhan847
Copy link
Author

Thanks man this will do the trick.

@dercoder dercoder closed this Sep 30, 2020
jcfrane pushed a commit to koalaphils/omnipay-ecopayz that referenced this pull request Jun 16, 2022
[PIW-20] fixed refresh token request

Approved-by: Cydrick Nonog <cydrick.nonog@zmtsys.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants