Save Hash as Service Attribute / Value

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
rvhelp2
Posts: 29
Joined: 29 Oct 2022, 10:10

Save Hash as Service Attribute / Value

Post by rvhelp2 » 21 Feb 2024, 17:12

i try to save hash in paymentprovider:
$baseItem = $this->getOrderBase($order->getBaseId());
$serviceItem = $baseItem->getServices('payment');
$serviceItem->setCode('order_hash');
$serviceItem->setValue($hash);
$this->saveOrder($order);

and then use it in confirm page to verify:
$baseItem = $this->getOrderBase($unconfirmed_order->getBaseId());
$serviceItem = $baseItem->getServices('payment');
$order_hash = $serviceItem->getAttribute('order_hash');

what am i doing wrong/ how to make this work?

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Save Hash as Service Attribute / Value

Post by aimeos » 23 Feb 2024, 10:38

rvhelp2 wrote: 21 Feb 2024, 17:12 i try to save hash in paymentprovider:
$serviceItem->setCode('order_hash');
$serviceItem->setValue($hash);

what am i doing wrong/ how to make this work?
You have to save the code/value as order server attribute, not in the order service item directly:
https://github.com/aimeos/aimeos-core/b ... #L498-L514
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply