Skip to content

Conversation

@roadster31
Copy link
Contributor

@roadster31 roadster31 commented Apr 19, 2017

Instead of using the "transaction_id" field for retrieving the Order, the PaymentController now uses the "return_context" field, which is initialized in the payment request with the order reference.

This is a safe way to remove filtering by module ID when searching the paid order :

$order = OrderQuery::create()
    ->filterByTransactionRef($result['transaction_id'])
    ->filterByPaymentModuleId($atos->getModuleModel()->getId())
     ->findOne();

We have now :

$order = OrderQuery::create()->findOneByRef($result['return_context']);

This way, modules extending Atos (such as AtosNx) are naturally supported the Atos PaymentController.

The PR also include minor code style fixes

@roadster31 roadster31 changed the title return-context is now used to exchange order ref PaymentController uses the "return_context" field instead of "transaction_id" Apr 19, 2017
@roadster31 roadster31 force-pushed the master branch 2 times, most recently from 93708b6 to 5ac8f84 Compare April 19, 2017 20:32
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.

1 participant