Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eway Improvements to support transparent redirect & shared gateway recurring #23

Merged
merged 10 commits into from
Feb 21, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

The interface allows for calling functions to check whether the gateway is transparentRedirect.

We should respect that here

The interface allows for calling functions to check whether the gateway is transparentRedirect.

We should respect that here
@eileenmcnaughton
Copy link
Contributor Author

I don't think the CI error relates to the change

eWay has a function to retrieve the merchant (originating website) generated
ID but it should implement the standardised Omnipay one per

https://github.com/thephpleague/omnipay#successful-response

which is ->getTransactionId(); // the reference set by the originating website if available.
@delatbabel
Copy link
Contributor

The CI errors are because your block in RapidDirectAbstractRequest commencing with:

if (!$this->getCardReference()) {

... is indented incorrectly. You have indented with 2 spaces, you need 4 for CS compliance.

@eileenmcnaughton eileenmcnaughton force-pushed the master branch 4 times, most recently from 7257c24 to 1ee2eee Compare September 25, 2017 07:00
These are not required & have already been passed, so leave out if not available.
Cvn is required for an onsite purchase. It is not required when processing a recurring payment.
It seems reasonable to assume that if not passed, and we are working with a DirectPayment with
a token then it is a recurring payment.

Setting to MOTO or Recurring would have the same effect. The practical difference between Recurring & MOTO is not clear
and there is not an obvious Omnipay standard to follow so sticking with this assumption for
now
@eileenmcnaughton
Copy link
Contributor Author

Thanks for that - I've fixed those - the original 5.3 CI error stands.

With these changes I have almost gotten eway working as recurring across all 3 Rapid methods - only one thing is still catching me (I hope only one) - the only way to set it process recurring without a cvn is to use the RapidDirect interface. I don't want my code to have to be aware of that so I logged thephpleague/omnipay-common#160 in order to get some thoughts on a generic way to define that. Note that the gateway would also need to call Direct rather than Shared/Transparent method. Resolving that is not a blocker to these changes.

@delatbabel
Copy link
Contributor

You can remove 5.3 from the travis.yml file, we're no longer seeing anyone use that. Most gateways have moved away from it.

@eileenmcnaughton
Copy link
Contributor Author

Done! Yay - it passes!

…ents.

When processing a recurring payment the directGateway should be
used as a 'Continuous' (recurring) authorization as the card is
not present at that stage

thephpleague/omnipay-common#160
thephpleague/omnipay#466
@eileenmcnaughton eileenmcnaughton changed the title Self-identify RapidResponse class as transparent redirect. Eway Improvements to support transparent redirect & shared gateway recurring Oct 2, 2017
@eileenmcnaughton eileenmcnaughton force-pushed the master branch 2 times, most recently from a225346 to 1e7efb8 Compare October 15, 2017 23:23
Eway does not natively allow you to make a concurrent purchase with a card creation
for the Direct gateway (only). I think we should be honouring this pattern (which
is used on other gateways) and we can do it by internally doing the purchase when the
card is created.
@ClaraLeigh
Copy link

Any update on this?
I needed to get tokens working in transparent redirects.

Before I saw this I started working on doing my own implementation.
https://github.com/JeramyNS/omnipay-eway
I could probably simply it to only need one function like setMethod('tokenPayment") and store it as a parameter. However I'm guessing this approach is probably better.

@eileenmcnaughton
Copy link
Contributor Author

This was working for me - it adds a separate gateway rather than a transparent redirect option to an existing gateway (which is kinda important when integrating into a package that supports multiple gateways)

@ClaraLeigh
Copy link

@eileenmcnaughton awesome!
@delatbabel can we please get this pull request merged?

@ClaraLeigh
Copy link

Actually, I still don't see anything in there for doing the method TokenPayment?
So you can take a payment and create a token at the same time

@eileenmcnaughton
Copy link
Contributor Author

You can purchase and create a token at the same time - or you can use createCard - https://omnipay.thephpleague.com/api/token-billing/

@fryiee
Copy link
Contributor

fryiee commented Feb 5, 2018

What's the situation on this? Would love to get it implemented...

@ClaraLeigh
Copy link

@fryiee same. I ended up hacking together to get what I wanted but I'd prefer to use this.

@delatbabel delatbabel merged commit 8de212f into thephpleague:master Feb 21, 2018
@delatbabel
Copy link
Contributor

Merged, thanks. I have been unwell for some time and I'm slowly getting around to my github backlog. Please confirm that this works in production then I will tag for release.

@fryiee
Copy link
Contributor

fryiee commented Feb 22, 2018

@delatbabel thanks!

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.

4 participants