thephpleague / omnipay-paymentexpress

PaymentExpress driver for the Omnipay PHP payment processing library
MIT License
24 stars 33 forks source link

3.1.0 Uses incorrect namespace, breaks payment API calls #64

Closed tractorcow closed 4 years ago

tractorcow commented 4 years ago

Attempting to create a Payment on 3.1.0 raised the below issue.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <s:Fault>
            <faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported
            </faultcode>
            <faultstring xml:lang="en-NZ">The message with Action 'http://windcave.com/IPxFusion/GetTransactionId'
                cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This
                may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a
                binding/security mismatch between the sender and the receiver. Check that sender and receiver have the
                same contract and the same binding (including security requirements, e.g. Message, Transport, None).
            </faultstring>
        </s:Fault>
    </s:Body>
</s:Envelope>

Rolling back to 3.0.1 resolved this in my project.

Has something else changed that https://github.com/thephpleague/omnipay-paymentexpress/pull/60 neglected to reflect in the rebranding?

barryvdh commented 4 years ago

@notf0und ?

tractorcow commented 4 years ago

I think it's because the action names are still paymentexpress.com, even when accessed via the new windcave.com domain.

https://sec.windcave.com/PxF/pxf.svc?singleWsdl

<wsdl:operation name="GetTransactionId">
<wsdl:input wsaw:Action="http://paymentexpress.com/IPxFusion/GetTransactionId" message="tns:IPxFusion_GetTransactionId_InputMessage"/>
<wsdl:output wsaw:Action="http://paymentexpress.com/IPxFusion/GetTransactionIdResponse" message="tns:IPxFusion_GetTransactionId_OutputMessage"/>
</wsdl:operation>
tractorcow commented 4 years ago

It looks like reverting the namespace to paymentexpress.com should fix it (I haven't tested it)

Also from https://sec.windcave.com/PxF/pxf.svc?singleWsdl

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://paymentexpress.com">

I left a comment at https://github.com/thephpleague/omnipay-paymentexpress/pull/60/files#r447270363 noting where this should be reverted.

notf0und commented 4 years ago

Hey sorry guys I have just tested it with PxPost since I didn't need to make use of PxFusion, but updated the links to what documentation says on https://www.windcave.com/developer-ecommerce-pxpost-pxfusion PxPost were not working on 3.0.1, reason why I did the PR, so maybe just PxFusion needs to be reverted back.

notf0und commented 4 years ago

Hey @tractorcow I made a PR #65, could you please test it? If you need you could check on my branch named revertNamespace: https://github.com/notf0und/omnipay-paymentexpress/tree/revertNamespace

Once you confirm that is working tag Barry so he merge the PR. Thank you

barryvdh commented 4 years ago

Can you try 3.1.1?

tractorcow commented 4 years ago

It's better... at least it's calling the method now. :)

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
    <GetTransactionIdResponse xmlns="http://paymentexpress.com">
        <GetTransactionIdResult xmlns:a="http://schemas.datacontract.org/2004/07/">
            <a:sessionId/>
            <a:success>false</a:success>
            <a:transactionId/>
        </GetTransactionIdResult>
    </GetTransactionIdResponse>
</s:Body>
</s:Envelope>

However it's returning a false success.

Caveat: it's possible that there is an in-app error that's generating an invalid request :) I need to debug further.

tractorcow commented 4 years ago

I'm going to assume the original issue is fixed (unable to call the method due to mismatched namespace).

If I have remaining issues I will debug and open new tickets.

Thanks team for the prompt responses and quick patch release.