Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Allow to post data on complete 3DS 2 calls #32

Closed
tjistooshort opened this issue Sep 8, 2020 · 1 comment
Closed

Allow to post data on complete 3DS 2 calls #32

tjistooshort opened this issue Sep 8, 2020 · 1 comment

Comments

@tjistooshort
Copy link

According to Spreedly guide:

Note: Worldpay uses postMessages to notify when authentication needs to progress to the next step. We pass these parameters in event.context.

{"MessageType": "profile.completed", "SessionId": "d3197c02-6f63-4ab2-801c-83633d097e32","Status": true)

These parameters should be included in the complete call using the key context.

{context: {"MessageType": "profile.completed", "SessionId": "d3197c02-6f63-4ab2-801c-83633d097e32", "Status": true}}

These parameters will only be sent during trigger-completion events

Would it be possible to allow to pass an array $data in the complete() call (it could be empty by default)?

    /**
     * Can be used to Completes a 3DS 2 transaction in the device fingerprint stage
     * See docs for more information.
     *
     * <code>
     *		// Completes a 3DS 2 transaction in the device fingerprint stage.
     *		Spreedly::transaction($transactionToken)->complete($data);
     * </code>
     *
     *
     * @return mixed
     *
     * @throws Exceptions\MissingTransactionTokenException
     */
    public function complete(array $data = [])
    {
        if (!$this->transactionToken) {
            throw new Exceptions\MissingTransactionTokenException();
        }

        return $this->client->post('v1/transactions/'.$this->transactionToken.'/complete.json', $data);
    }
@tuurbo
Copy link
Owner

tuurbo commented Sep 10, 2020

@tuurbo tuurbo closed this as completed Sep 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants