ambroisemaupate / omnipay-sips2

Omnipay gateway for Worldline Sips PayPage POST API (Atos Sips 2.0)
5 stars 5 forks source link

CompletePurchaseResponse #5

Open yagogak opened 6 years ago

yagogak commented 6 years ago

Hi Ambroise,

In complete purchase response your getTransactionId should get the authorisationId field, there is no orderId key in the returned array

   /**
     * Get the transaction ID as generated by the merchant website.
     *
     * @return string
     */
    public function getTransactionId()
    {
        return $this->fields['authorisationId'];
    }
ambroisemaupate commented 6 years ago

Hi @yagogak

transactionId is meant for your website database. See transactionId vs transactionReference section on https://omnipay.thephpleague.com/gateways/build-your-own/

So I chose to map it in the PurchaseRequest as orderId. Then Sips gateway should give it back to you during CompletePurchaseRequest under the same name.

Do not confuse it with transactionReference which is the Sips generated transaction number.