[{"data":1,"prerenderedAt":2062},["ShallowReactive",2],{"navigation_docs":3,"-packages-fluent-php-host-owns-its-tables":465,"-packages-fluent-php-host-owns-its-tables-surround":2057},[4,8,62,115,450],{"title":5,"path":6,"stem":7},"Introduction","\u002Fintroduction","0.introduction",{"title":9,"path":10,"stem":11,"children":12,"page":61},"Guides","\u002Fguides","1.guides",[13,17,21,25,29,33,37,41,45,49,53,57],{"title":14,"path":15,"stem":16},"Quickstart","\u002Fguides\u002Fquickstart","1.guides\u002F1.quickstart",{"title":18,"path":19,"stem":20},"Payouts & Settlement","\u002Fguides\u002Fpayouts","1.guides\u002F10.payouts",{"title":22,"path":23,"stem":24},"Customer Emails","\u002Fguides\u002Fcustomer-emails","1.guides\u002F11.customer-emails",{"title":26,"path":27,"stem":28},"Build your own integration","\u002Fguides\u002Fbuild-your-own-integration","1.guides\u002F2.build-your-own-integration",{"title":30,"path":31,"stem":32},"Selling Workflow","\u002Fguides\u002Fselling-workflow","1.guides\u002F2.selling-workflow",{"title":34,"path":35,"stem":36},"Vatly SDKs","\u002Fguides\u002Fsdks","1.guides\u002F3.sdks",{"title":38,"path":39,"stem":40},"Authentication","\u002Fguides\u002Fauthentication","1.guides\u002F4.authentication",{"title":42,"path":43,"stem":44},"Pagination","\u002Fguides\u002Fpagination","1.guides\u002F5.pagination",{"title":46,"path":47,"stem":48},"Errors","\u002Fguides\u002Ferrors","1.guides\u002F6.errors",{"title":50,"path":51,"stem":52},"Webhooks","\u002Fguides\u002Fwebhooks","1.guides\u002F7.webhooks",{"title":54,"path":55,"stem":56},"Idempotency","\u002Fguides\u002Fidempotency","1.guides\u002F8.idempotency",{"title":58,"path":59,"stem":60},"Testing","\u002Fguides\u002Ftesting","1.guides\u002F9.testing",false,{"title":63,"path":64,"stem":65,"children":66,"page":61},"Api Reference","\u002Fapi-reference","2.api-reference",[67,71,75,79,83,87,91,95,99,103,107,111],{"title":68,"path":69,"stem":70},"Customers","\u002Fapi-reference\u002Fcustomers","2.api-reference\u002F1.customers",{"title":72,"path":73,"stem":74},"Webhook Endpoints","\u002Fapi-reference\u002Fwebhook-endpoints","2.api-reference\u002F10.webhook-endpoints",{"title":76,"path":77,"stem":78},"Test helpers","\u002Fapi-reference\u002Ftest-helpers","2.api-reference\u002F11.test-helpers",{"title":80,"path":81,"stem":82},"Checkouts","\u002Fapi-reference\u002Fcheckouts","2.api-reference\u002F2.checkouts",{"title":84,"path":85,"stem":86},"One-off Products","\u002Fapi-reference\u002Fone-off-products","2.api-reference\u002F3.one-off-products",{"title":88,"path":89,"stem":90},"Subscriptions","\u002Fapi-reference\u002Fsubscriptions","2.api-reference\u002F4.subscriptions",{"title":92,"path":93,"stem":94},"Subscription Plans","\u002Fapi-reference\u002Fsubscription-plans","2.api-reference\u002F5.subscription-plans",{"title":96,"path":97,"stem":98},"Orders","\u002Fapi-reference\u002Forders","2.api-reference\u002F6.orders",{"title":100,"path":101,"stem":102},"Order Refunds","\u002Fapi-reference\u002Frefunds","2.api-reference\u002F7.refunds",{"title":104,"path":105,"stem":106},"Refunds","\u002Fapi-reference\u002Fglobal-refunds","2.api-reference\u002F8.global-refunds",{"title":108,"path":109,"stem":110},"Chargebacks","\u002Fapi-reference\u002Fchargebacks","2.api-reference\u002F9.chargebacks",{"title":112,"path":113,"stem":114},"Webhook Events","\u002Fapi-reference\u002Fwebhook-events","2.api-reference\u002F99.webhook-events",{"title":116,"path":117,"stem":118,"children":119},"Packages","\u002Fpackages","3.packages",[120,122,164,210,244,283,318,366,408],{"title":116,"path":117,"stem":121},"3.packages\u002Findex",{"title":123,"path":124,"stem":125,"children":126,"page":61},"PHP SDK","\u002Fpackages\u002Fphp","3.packages\u002F1.php",[127,131,134,137,140,144,147,151,154,157,160],{"title":128,"path":129,"stem":130},"Getting started","\u002Fpackages\u002Fphp\u002Freadme","3.packages\u002F1.php\u002F00.readme",{"title":68,"path":132,"stem":133},"\u002Fpackages\u002Fphp\u002Fcustomers","3.packages\u002F1.php\u002F02.customers",{"title":80,"path":135,"stem":136},"\u002Fpackages\u002Fphp\u002Fcheckouts","3.packages\u002F1.php\u002F03.checkouts",{"title":88,"path":138,"stem":139},"\u002Fpackages\u002Fphp\u002Fsubscriptions","3.packages\u002F1.php\u002F04.subscriptions",{"title":141,"path":142,"stem":143},"Subscription plans","\u002Fpackages\u002Fphp\u002Fsubscriptionplans","3.packages\u002F1.php\u002F05.subscriptionplans",{"title":96,"path":145,"stem":146},"\u002Fpackages\u002Fphp\u002Forders","3.packages\u002F1.php\u002F06.orders",{"title":148,"path":149,"stem":150},"One-off products","\u002Fpackages\u002Fphp\u002Foneoffproducts","3.packages\u002F1.php\u002F07.oneoffproducts",{"title":104,"path":152,"stem":153},"\u002Fpackages\u002Fphp\u002Frefunds","3.packages\u002F1.php\u002F08.refunds",{"title":108,"path":155,"stem":156},"\u002Fpackages\u002Fphp\u002Fchargebacks","3.packages\u002F1.php\u002F09.chargebacks",{"title":50,"path":158,"stem":159},"\u002Fpackages\u002Fphp\u002Fwebhooks","3.packages\u002F1.php\u002F10.webhooks",{"title":161,"path":162,"stem":163},"Webhook URLs","\u002Fpackages\u002Fphp\u002Fwebhookendpoints","3.packages\u002F1.php\u002F11.webhookendpoints",{"title":165,"path":166,"stem":167,"children":168,"page":61},"PHP Fluent","\u002Fpackages\u002Ffluent-php","3.packages\u002F2.fluent-php",[169,172,176,180,183,186,189,192,196,199,203,207],{"title":128,"path":170,"stem":171},"\u002Fpackages\u002Ffluent-php\u002Freadme","3.packages\u002F2.fluent-php\u002F00.readme",{"title":173,"path":174,"stem":175},"Configuration","\u002Fpackages\u002Ffluent-php\u002Fconfiguration","3.packages\u002F2.fluent-php\u002F01.configuration",{"title":177,"path":178,"stem":179},"Core concepts","\u002Fpackages\u002Ffluent-php\u002Fcoreconcepts","3.packages\u002F2.fluent-php\u002F02.coreconcepts",{"title":68,"path":181,"stem":182},"\u002Fpackages\u002Ffluent-php\u002Fcustomers","3.packages\u002F2.fluent-php\u002F03.customers",{"title":80,"path":184,"stem":185},"\u002Fpackages\u002Ffluent-php\u002Fcheckouts","3.packages\u002F2.fluent-php\u002F04.checkouts",{"title":88,"path":187,"stem":188},"\u002Fpackages\u002Ffluent-php\u002Fsubscriptions","3.packages\u002F2.fluent-php\u002F05.subscriptions",{"title":96,"path":190,"stem":191},"\u002Fpackages\u002Ffluent-php\u002Forders","3.packages\u002F2.fluent-php\u002F06.orders",{"title":193,"path":194,"stem":195},"Customer portal","\u002Fpackages\u002Ffluent-php\u002Fcustomerportal","3.packages\u002F2.fluent-php\u002F07.customerportal",{"title":50,"path":197,"stem":198},"\u002Fpackages\u002Ffluent-php\u002Fwebhooks","3.packages\u002F2.fluent-php\u002F08.webhooks",{"title":200,"path":201,"stem":202},"Webhook event flow","\u002Fpackages\u002Ffluent-php\u002Fwebhook-flow","3.packages\u002F2.fluent-php\u002F09.webhook-flow",{"title":204,"path":205,"stem":206},"Existing tables","\u002Fpackages\u002Ffluent-php\u002Fhost-owns-its-tables","3.packages\u002F2.fluent-php\u002F10.host-owns-its-tables",{"title":58,"path":208,"stem":209},"\u002Fpackages\u002Ffluent-php\u002Ftesting","3.packages\u002F2.fluent-php\u002F11.testing",{"title":211,"path":212,"stem":213,"children":214,"page":61},"Laravel","\u002Fpackages\u002Flaravel","3.packages\u002F3.laravel",[215,218,221,224,227,230,233,236,240],{"title":128,"path":216,"stem":217},"\u002Fpackages\u002Flaravel\u002Freadme","3.packages\u002F3.laravel\u002F00.readme",{"title":173,"path":219,"stem":220},"\u002Fpackages\u002Flaravel\u002Fconfiguration","3.packages\u002F3.laravel\u002F01.configuration",{"title":68,"path":222,"stem":223},"\u002Fpackages\u002Flaravel\u002Fcustomers","3.packages\u002F3.laravel\u002F02.customers",{"title":80,"path":225,"stem":226},"\u002Fpackages\u002Flaravel\u002Fcheckouts","3.packages\u002F3.laravel\u002F03.checkouts",{"title":88,"path":228,"stem":229},"\u002Fpackages\u002Flaravel\u002Fsubscriptions","3.packages\u002F3.laravel\u002F04.subscriptions",{"title":96,"path":231,"stem":232},"\u002Fpackages\u002Flaravel\u002Forders","3.packages\u002F3.laravel\u002F05.orders",{"title":50,"path":234,"stem":235},"\u002Fpackages\u002Flaravel\u002Fwebhooks","3.packages\u002F3.laravel\u002F06.webhooks",{"title":237,"path":238,"stem":239},"Comparison","\u002Fpackages\u002Flaravel\u002Fcomparison","3.packages\u002F3.laravel\u002F07.comparison",{"title":241,"path":242,"stem":243},"Migrating from Cashier","\u002Fpackages\u002Flaravel\u002Fmigrating-to-vatly","3.packages\u002F3.laravel\u002F08.migrating-to-vatly",{"title":245,"path":246,"stem":247,"children":248,"page":61},"JavaScript SDK","\u002Fpackages\u002Fjavascript","3.packages\u002F4.javascript",[249,252,255,258,261,264,267,270,273,276,279],{"title":128,"path":250,"stem":251},"\u002Fpackages\u002Fjavascript\u002Freadme","3.packages\u002F4.javascript\u002F00.readme",{"title":68,"path":253,"stem":254},"\u002Fpackages\u002Fjavascript\u002Fcustomers","3.packages\u002F4.javascript\u002F02.customers",{"title":80,"path":256,"stem":257},"\u002Fpackages\u002Fjavascript\u002Fcheckouts","3.packages\u002F4.javascript\u002F03.checkouts",{"title":88,"path":259,"stem":260},"\u002Fpackages\u002Fjavascript\u002Fsubscriptions","3.packages\u002F4.javascript\u002F04.subscriptions",{"title":141,"path":262,"stem":263},"\u002Fpackages\u002Fjavascript\u002Fsubscriptionplans","3.packages\u002F4.javascript\u002F05.subscriptionplans",{"title":96,"path":265,"stem":266},"\u002Fpackages\u002Fjavascript\u002Forders","3.packages\u002F4.javascript\u002F06.orders",{"title":148,"path":268,"stem":269},"\u002Fpackages\u002Fjavascript\u002Foneoffproducts","3.packages\u002F4.javascript\u002F07.oneoffproducts",{"title":104,"path":271,"stem":272},"\u002Fpackages\u002Fjavascript\u002Frefunds","3.packages\u002F4.javascript\u002F08.refunds",{"title":108,"path":274,"stem":275},"\u002Fpackages\u002Fjavascript\u002Fchargebacks","3.packages\u002F4.javascript\u002F09.chargebacks",{"title":50,"path":277,"stem":278},"\u002Fpackages\u002Fjavascript\u002Fwebhooks","3.packages\u002F4.javascript\u002F10.webhooks",{"title":280,"path":281,"stem":282},"API reference","\u002Fpackages\u002Fjavascript\u002Fapi","3.packages\u002F4.javascript\u002F12.api",{"title":284,"path":285,"stem":286,"children":287,"page":61},"JavaScript Fluent","\u002Fpackages\u002Ffluent-js","3.packages\u002F5.fluent-js",[288,291,294,297,300,303,306,309,312,315],{"title":128,"path":289,"stem":290},"\u002Fpackages\u002Ffluent-js\u002Freadme","3.packages\u002F5.fluent-js\u002F00.readme",{"title":173,"path":292,"stem":293},"\u002Fpackages\u002Ffluent-js\u002Fconfiguration","3.packages\u002F5.fluent-js\u002F01.configuration",{"title":177,"path":295,"stem":296},"\u002Fpackages\u002Ffluent-js\u002Fcoreconcepts","3.packages\u002F5.fluent-js\u002F02.coreconcepts",{"title":68,"path":298,"stem":299},"\u002Fpackages\u002Ffluent-js\u002Fcustomers","3.packages\u002F5.fluent-js\u002F03.customers",{"title":80,"path":301,"stem":302},"\u002Fpackages\u002Ffluent-js\u002Fcheckouts","3.packages\u002F5.fluent-js\u002F04.checkouts",{"title":88,"path":304,"stem":305},"\u002Fpackages\u002Ffluent-js\u002Fsubscriptions","3.packages\u002F5.fluent-js\u002F05.subscriptions",{"title":96,"path":307,"stem":308},"\u002Fpackages\u002Ffluent-js\u002Forders","3.packages\u002F5.fluent-js\u002F06.orders",{"title":193,"path":310,"stem":311},"\u002Fpackages\u002Ffluent-js\u002Fcustomerportal","3.packages\u002F5.fluent-js\u002F07.customerportal",{"title":50,"path":313,"stem":314},"\u002Fpackages\u002Ffluent-js\u002Fwebhooks","3.packages\u002F5.fluent-js\u002F08.webhooks",{"title":58,"path":316,"stem":317},"\u002Fpackages\u002Ffluent-js\u002Ftesting","3.packages\u002F5.fluent-js\u002F11.testing",{"title":319,"path":320,"stem":321,"children":322,"page":61},"Python SDK","\u002Fpackages\u002Fpython","3.packages\u002F6.python",[323,326,329,332,335,338,341,344,347,350,353,356,359,362],{"title":128,"path":324,"stem":325},"\u002Fpackages\u002Fpython\u002Freadme","3.packages\u002F6.python\u002F00.readme",{"title":173,"path":327,"stem":328},"\u002Fpackages\u002Fpython\u002Fconfiguration","3.packages\u002F6.python\u002F01.configuration",{"title":68,"path":330,"stem":331},"\u002Fpackages\u002Fpython\u002Fcustomers","3.packages\u002F6.python\u002F02.customers",{"title":80,"path":333,"stem":334},"\u002Fpackages\u002Fpython\u002Fcheckouts","3.packages\u002F6.python\u002F03.checkouts",{"title":88,"path":336,"stem":337},"\u002Fpackages\u002Fpython\u002Fsubscriptions","3.packages\u002F6.python\u002F04.subscriptions",{"title":141,"path":339,"stem":340},"\u002Fpackages\u002Fpython\u002Fsubscriptionplans","3.packages\u002F6.python\u002F05.subscriptionplans",{"title":96,"path":342,"stem":343},"\u002Fpackages\u002Fpython\u002Forders","3.packages\u002F6.python\u002F06.orders",{"title":148,"path":345,"stem":346},"\u002Fpackages\u002Fpython\u002Foneoffproducts","3.packages\u002F6.python\u002F07.oneoffproducts",{"title":104,"path":348,"stem":349},"\u002Fpackages\u002Fpython\u002Frefunds","3.packages\u002F6.python\u002F08.refunds",{"title":108,"path":351,"stem":352},"\u002Fpackages\u002Fpython\u002Fchargebacks","3.packages\u002F6.python\u002F09.chargebacks",{"title":50,"path":354,"stem":355},"\u002Fpackages\u002Fpython\u002Fwebhooks","3.packages\u002F6.python\u002F10.webhooks",{"title":161,"path":357,"stem":358},"\u002Fpackages\u002Fpython\u002Fwebhookendpoints","3.packages\u002F6.python\u002F11.webhookendpoints",{"title":280,"path":360,"stem":361},"\u002Fpackages\u002Fpython\u002Fapi","3.packages\u002F6.python\u002F12.api",{"title":363,"path":364,"stem":365},"Development","\u002Fpackages\u002Fpython\u002Fdevelopment","3.packages\u002F6.python\u002F13.development",{"title":367,"path":368,"stem":369,"children":370,"page":61},"Python Fluent","\u002Fpackages\u002Ffluent-python","3.packages\u002F7.fluent-python",[371,374,377,380,383,386,389,392,395,398,401,405],{"title":128,"path":372,"stem":373},"\u002Fpackages\u002Ffluent-python\u002Freadme","3.packages\u002F7.fluent-python\u002F00.readme",{"title":173,"path":375,"stem":376},"\u002Fpackages\u002Ffluent-python\u002Fconfiguration","3.packages\u002F7.fluent-python\u002F01.configuration",{"title":177,"path":378,"stem":379},"\u002Fpackages\u002Ffluent-python\u002Fcoreconcepts","3.packages\u002F7.fluent-python\u002F02.coreconcepts",{"title":68,"path":381,"stem":382},"\u002Fpackages\u002Ffluent-python\u002Fcustomers","3.packages\u002F7.fluent-python\u002F03.customers",{"title":80,"path":384,"stem":385},"\u002Fpackages\u002Ffluent-python\u002Fcheckouts","3.packages\u002F7.fluent-python\u002F04.checkouts",{"title":88,"path":387,"stem":388},"\u002Fpackages\u002Ffluent-python\u002Fsubscriptions","3.packages\u002F7.fluent-python\u002F05.subscriptions",{"title":96,"path":390,"stem":391},"\u002Fpackages\u002Ffluent-python\u002Forders","3.packages\u002F7.fluent-python\u002F06.orders",{"title":193,"path":393,"stem":394},"\u002Fpackages\u002Ffluent-python\u002Fcustomerportal","3.packages\u002F7.fluent-python\u002F07.customerportal",{"title":50,"path":396,"stem":397},"\u002Fpackages\u002Ffluent-python\u002Fwebhooks","3.packages\u002F7.fluent-python\u002F08.webhooks",{"title":58,"path":399,"stem":400},"\u002Fpackages\u002Ffluent-python\u002Ftesting","3.packages\u002F7.fluent-python\u002F11.testing",{"title":402,"path":403,"stem":404},"Porting","\u002Fpackages\u002Ffluent-python\u002Fporting","3.packages\u002F7.fluent-python\u002F12.porting",{"title":363,"path":406,"stem":407},"\u002Fpackages\u002Ffluent-python\u002Fdevelopment","3.packages\u002F7.fluent-python\u002F13.development",{"title":409,"path":410,"stem":411,"children":412,"page":61},"Django","\u002Fpackages\u002Fdjango","3.packages\u002F8.django",[413,416,420,423,427,431,434,437,440,444,447],{"title":128,"path":414,"stem":415},"\u002Fpackages\u002Fdjango\u002Freadme","3.packages\u002F8.django\u002F00.readme",{"title":417,"path":418,"stem":419},"Installation","\u002Fpackages\u002Fdjango\u002Finstallation","3.packages\u002F8.django\u002F01.installation",{"title":173,"path":421,"stem":422},"\u002Fpackages\u002Fdjango\u002Fconfiguration","3.packages\u002F8.django\u002F02.configuration",{"title":424,"path":425,"stem":426},"Billable models","\u002Fpackages\u002Fdjango\u002Fbillablemodels","3.packages\u002F8.django\u002F03.billablemodels",{"title":428,"path":429,"stem":430},"Checkout","\u002Fpackages\u002Fdjango\u002Fcheckout","3.packages\u002F8.django\u002F04.checkout",{"title":88,"path":432,"stem":433},"\u002Fpackages\u002Fdjango\u002Fbilling","3.packages\u002F8.django\u002F05.billing",{"title":193,"path":435,"stem":436},"\u002Fpackages\u002Fdjango\u002Fcustomerportal","3.packages\u002F8.django\u002F06.customerportal",{"title":50,"path":438,"stem":439},"\u002Fpackages\u002Fdjango\u002Fwebhooks","3.packages\u002F8.django\u002F07.webhooks",{"title":441,"path":442,"stem":443},"Admin","\u002Fpackages\u002Fdjango\u002Fadmin","3.packages\u002F8.django\u002F08.admin",{"title":58,"path":445,"stem":446},"\u002Fpackages\u002Fdjango\u002Ftesting","3.packages\u002F8.django\u002F09.testing",{"title":363,"path":448,"stem":449},"\u002Fpackages\u002Fdjango\u002Fdevelopment","3.packages\u002F8.django\u002F10.development",{"title":451,"path":452,"stem":453,"children":454},"Integrations","\u002Fintegrations","4.integrations",[455,457,461],{"title":451,"path":452,"stem":456},"4.integrations\u002Findex",{"title":458,"path":459,"stem":460},"Lovable payments with Vatly","\u002Fintegrations\u002Flovable","4.integrations\u002F1.lovable",{"title":462,"path":463,"stem":464},"Bolt payments with Vatly","\u002Fintegrations\u002Fbolt","4.integrations\u002F2.bolt",{"id":466,"title":467,"body":468,"description":2050,"extension":2051,"links":2052,"meta":2053,"navigation":2054,"path":205,"seo":2055,"stem":206,"__hash__":2056},"docs\u002F3.packages\u002F2.fluent-php\u002F10.host-owns-its-tables.md","Host tables",{"type":469,"value":470,"toc":2045},"minimark",[471,480,524,529,965,969,984,1975,1992,2005,2009,2016,2022,2041],[472,473,474,475,479],"p",{},"Reuse an application's existing orders instead of creating parallel Fluent tables. Wrap its record in ",[476,477,478],"code",{},"OrderInterface",", then let your repository confirm that record when the payment webhook arrives.",[472,481,482,483,486,487,490,491,490,494,490,497,490,500,490,503,490,506,509,510,513,514,516,517,519,520,523],{},"This example uses PDO and an existing ",[476,484,485],{},"host_orders"," table with ",[476,488,489],{},"id",", ",[476,492,493],{},"vatly_id",[476,495,496],{},"status",[476,498,499],{},"invoice_number",[476,501,502],{},"total",[476,504,505],{},"currency",[476,507,508],{},"payment_method",", and ",[476,511,512],{},"testmode"," columns. ",[476,515,489],{}," is the host primary key; make ",[476,518,493],{}," unique. ",[476,521,522],{},"$db"," uses exception mode. Keep additional ownership, tax, and fulfillment fields required by your application.",[525,526,528],"h2",{"id":527},"wrap-the-host-record","Wrap the host record",[530,531,536],"pre",{"className":532,"code":533,"language":534,"meta":535,"style":535},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Vatly\\Fluent\\Contracts\\OrderInterface;\n\nfinal class HostOrder implements OrderInterface\n{\n    public function __construct(public readonly array $row) {}\n\n    public function getVatlyId(): string { return $this->row['vatly_id']; }\n    public function getStatus(): string { return $this->row['status']; }\n    public function getInvoiceNumber(): ?string { return $this->row['invoice_number']; }\n    public function getTotal(): int { return (int) $this->row['total']; }\n    public function getCurrency(): string { return $this->row['currency']; }\n    public function getPaymentMethod(): ?string { return $this->row['payment_method']; }\n    public function isPaid(): bool { return $this->getStatus() === 'paid'; }\n    public function isTestmode(): bool { return (bool) $this->row['testmode']; }\n}\n","php","",[476,537,538,570,577,597,603,640,645,690,724,762,805,839,875,918,959],{"__ignoreMap":535},[539,540,543,547,551,555,558,560,563,565,567],"span",{"class":541,"line":542},"line",1,[539,544,546],{"class":545},"sbssI","use",[539,548,550],{"class":549},"sTEyZ"," Vatly",[539,552,554],{"class":553},"sMK4o","\\",[539,556,557],{"class":549},"Fluent",[539,559,554],{"class":553},[539,561,562],{"class":549},"Contracts",[539,564,554],{"class":553},[539,566,478],{"class":549},[539,568,569],{"class":553},";\n",[539,571,573],{"class":541,"line":572},2,[539,574,576],{"emptyLinePlaceholder":575},true,"\n",[539,578,580,584,587,591,594],{"class":541,"line":579},3,[539,581,583],{"class":582},"spNyl","final",[539,585,586],{"class":582}," class",[539,588,590],{"class":589},"sBMFI"," HostOrder",[539,592,593],{"class":582}," implements",[539,595,596],{"class":589}," OrderInterface\n",[539,598,600],{"class":541,"line":599},4,[539,601,602],{"class":553},"{\n",[539,604,606,609,612,616,619,622,625,628,631,634,637],{"class":541,"line":605},5,[539,607,608],{"class":582},"    public",[539,610,611],{"class":582}," function",[539,613,615],{"class":614},"s2Zo4"," __construct",[539,617,618],{"class":553},"(",[539,620,621],{"class":582},"public",[539,623,624],{"class":582}," readonly",[539,626,627],{"class":545}," array",[539,629,630],{"class":553}," $",[539,632,633],{"class":549},"row",[539,635,636],{"class":553},")",[539,638,639],{"class":553}," {}\n",[539,641,643],{"class":541,"line":642},6,[539,644,576],{"emptyLinePlaceholder":575},[539,646,648,650,652,655,658,661,664,668,671,673,676,679,682,684,687],{"class":541,"line":647},7,[539,649,608],{"class":582},[539,651,611],{"class":582},[539,653,654],{"class":614}," getVatlyId",[539,656,657],{"class":553},"():",[539,659,660],{"class":545}," string",[539,662,663],{"class":553}," {",[539,665,667],{"class":666},"s7zQu"," return",[539,669,670],{"class":553}," $this->",[539,672,633],{"class":549},[539,674,675],{"class":553},"[",[539,677,678],{"class":553},"'",[539,680,493],{"class":681},"sfazB",[539,683,678],{"class":553},[539,685,686],{"class":553},"];",[539,688,689],{"class":553}," }\n",[539,691,693,695,697,700,702,704,706,708,710,712,714,716,718,720,722],{"class":541,"line":692},8,[539,694,608],{"class":582},[539,696,611],{"class":582},[539,698,699],{"class":614}," getStatus",[539,701,657],{"class":553},[539,703,660],{"class":545},[539,705,663],{"class":553},[539,707,667],{"class":666},[539,709,670],{"class":553},[539,711,633],{"class":549},[539,713,675],{"class":553},[539,715,678],{"class":553},[539,717,496],{"class":681},[539,719,678],{"class":553},[539,721,686],{"class":553},[539,723,689],{"class":553},[539,725,727,729,731,734,736,739,742,744,746,748,750,752,754,756,758,760],{"class":541,"line":726},9,[539,728,608],{"class":582},[539,730,611],{"class":582},[539,732,733],{"class":614}," getInvoiceNumber",[539,735,657],{"class":553},[539,737,738],{"class":553}," ?",[539,740,741],{"class":545},"string",[539,743,663],{"class":553},[539,745,667],{"class":666},[539,747,670],{"class":553},[539,749,633],{"class":549},[539,751,675],{"class":553},[539,753,678],{"class":553},[539,755,499],{"class":681},[539,757,678],{"class":553},[539,759,686],{"class":553},[539,761,689],{"class":553},[539,763,765,767,769,772,774,777,779,781,784,787,789,791,793,795,797,799,801,803],{"class":541,"line":764},10,[539,766,608],{"class":582},[539,768,611],{"class":582},[539,770,771],{"class":614}," getTotal",[539,773,657],{"class":553},[539,775,776],{"class":545}," int",[539,778,663],{"class":553},[539,780,667],{"class":666},[539,782,783],{"class":553}," (",[539,785,786],{"class":582},"int",[539,788,636],{"class":553},[539,790,670],{"class":553},[539,792,633],{"class":549},[539,794,675],{"class":553},[539,796,678],{"class":553},[539,798,502],{"class":681},[539,800,678],{"class":553},[539,802,686],{"class":553},[539,804,689],{"class":553},[539,806,808,810,812,815,817,819,821,823,825,827,829,831,833,835,837],{"class":541,"line":807},11,[539,809,608],{"class":582},[539,811,611],{"class":582},[539,813,814],{"class":614}," getCurrency",[539,816,657],{"class":553},[539,818,660],{"class":545},[539,820,663],{"class":553},[539,822,667],{"class":666},[539,824,670],{"class":553},[539,826,633],{"class":549},[539,828,675],{"class":553},[539,830,678],{"class":553},[539,832,505],{"class":681},[539,834,678],{"class":553},[539,836,686],{"class":553},[539,838,689],{"class":553},[539,840,842,844,846,849,851,853,855,857,859,861,863,865,867,869,871,873],{"class":541,"line":841},12,[539,843,608],{"class":582},[539,845,611],{"class":582},[539,847,848],{"class":614}," getPaymentMethod",[539,850,657],{"class":553},[539,852,738],{"class":553},[539,854,741],{"class":545},[539,856,663],{"class":553},[539,858,667],{"class":666},[539,860,670],{"class":553},[539,862,633],{"class":549},[539,864,675],{"class":553},[539,866,678],{"class":553},[539,868,508],{"class":681},[539,870,678],{"class":553},[539,872,686],{"class":553},[539,874,689],{"class":553},[539,876,878,880,882,885,887,890,892,894,896,899,902,905,908,911,913,916],{"class":541,"line":877},13,[539,879,608],{"class":582},[539,881,611],{"class":582},[539,883,884],{"class":614}," isPaid",[539,886,657],{"class":553},[539,888,889],{"class":545}," bool",[539,891,663],{"class":553},[539,893,667],{"class":666},[539,895,670],{"class":553},[539,897,898],{"class":614},"getStatus",[539,900,901],{"class":553},"()",[539,903,904],{"class":553}," ===",[539,906,907],{"class":553}," '",[539,909,910],{"class":681},"paid",[539,912,678],{"class":553},[539,914,915],{"class":553},";",[539,917,689],{"class":553},[539,919,921,923,925,928,930,932,934,936,938,941,943,945,947,949,951,953,955,957],{"class":541,"line":920},14,[539,922,608],{"class":582},[539,924,611],{"class":582},[539,926,927],{"class":614}," isTestmode",[539,929,657],{"class":553},[539,931,889],{"class":545},[539,933,663],{"class":553},[539,935,667],{"class":666},[539,937,783],{"class":553},[539,939,940],{"class":582},"bool",[539,942,636],{"class":553},[539,944,670],{"class":553},[539,946,633],{"class":549},[539,948,675],{"class":553},[539,950,678],{"class":553},[539,952,512],{"class":681},[539,954,678],{"class":553},[539,956,686],{"class":553},[539,958,689],{"class":553},[539,960,962],{"class":541,"line":961},15,[539,963,964],{"class":553},"}\n",[525,966,968],{"id":967},"confirm-once-reconcile-on-retry","Confirm once, reconcile on retry",[472,970,971,972,975,976,979,980,983],{},"Create your host order before checkout. Stamp its server-chosen ID in ",[476,973,974],{},"withMetadata(['host_order_id' => ...])",", as shown in ",[977,978,80],"a",{"href":184},". Wire this repository as ",[476,981,982],{},"Wiring(orders: ...)",":",[530,985,987],{"className":532,"code":986,"language":534,"meta":535,"style":535},"use Vatly\\Fluent\\Contracts\\OrderInterface;\nuse Vatly\\Fluent\\Contracts\\OrderRepositoryInterface;\nuse Vatly\\Fluent\\Data\\StoreOrderData;\nuse Vatly\\Fluent\\Data\\UpdateOrderData;\n\nfinal class HostOrders implements OrderRepositoryInterface\n{\n    public function __construct(private PDO $db) {}\n\n    public function findByVatlyId(string $vatlyId): ?OrderInterface\n    {\n        $query = $this->db->prepare('SELECT * FROM host_orders WHERE vatly_id = ?');\n        $query->execute([$vatlyId]);\n        $row = $query->fetch(PDO::FETCH_ASSOC);\n        return $row === false ? null : new HostOrder($row);\n    }\n\n    public function store(StoreOrderData $data): ?OrderInterface\n    {\n        $hostId = $data->metadata['host_order_id'] ?? null;\n        if ($hostId === null) {\n            return null;\n        }\n\n        $query = $this->db->prepare(\n            'UPDATE host_orders SET vatly_id = ?, status = ?, invoice_number = ?, '\n            . 'total = ?, currency = ?, payment_method = ?, testmode = ? '\n            . 'WHERE id = ? AND vatly_id IS NULL AND testmode = ?'\n        );\n        $query->execute([\n            $data->vatlyId, $data->status, $data->invoiceNumber,\n            $data->total, $data->currency, $data->paymentMethod,\n            (int) $data->testmode, $hostId, (int) $data->testmode,\n        ]);\n        return $this->findByVatlyId($data->vatlyId);\n    }\n\n    public function update(OrderInterface $order, UpdateOrderData $data): OrderInterface\n    {\n        $query = $this->db->prepare(\n            'UPDATE host_orders SET status = ?, invoice_number = ?, total = ?, '\n            . 'currency = ?, payment_method = ? WHERE vatly_id = ?'\n        );\n        $query->execute([\n            $data->status ?? $order->getStatus(),\n            $data->invoiceNumber ?? $order->getInvoiceNumber(),\n            $data->total ?? $order->getTotal(),\n            $data->currency ?? $order->getCurrency(),\n            $data->paymentMethod ?? $order->getPaymentMethod(),\n            $order->getVatlyId(),\n        ]);\n        return $this->findByVatlyId($order->getVatlyId())\n            ?? throw new RuntimeException('Host order disappeared during update');\n    }\n}\n",[476,988,989,1009,1030,1052,1073,1077,1091,1095,1120,1124,1150,1155,1207,1227,1258,1293,1299,1304,1329,1334,1371,1390,1398,1404,1409,1429,1465,1478,1490,1496,1510,1547,1581,1624,1630,1650,1655,1660,1692,1697,1716,1745,1757,1762,1775,1801,1826,1851,1876,1901,1915,1920,1940,1965,1970],{"__ignoreMap":535},[539,990,991,993,995,997,999,1001,1003,1005,1007],{"class":541,"line":542},[539,992,546],{"class":545},[539,994,550],{"class":549},[539,996,554],{"class":553},[539,998,557],{"class":549},[539,1000,554],{"class":553},[539,1002,562],{"class":549},[539,1004,554],{"class":553},[539,1006,478],{"class":549},[539,1008,569],{"class":553},[539,1010,1011,1013,1015,1017,1019,1021,1023,1025,1028],{"class":541,"line":572},[539,1012,546],{"class":545},[539,1014,550],{"class":549},[539,1016,554],{"class":553},[539,1018,557],{"class":549},[539,1020,554],{"class":553},[539,1022,562],{"class":549},[539,1024,554],{"class":553},[539,1026,1027],{"class":549},"OrderRepositoryInterface",[539,1029,569],{"class":553},[539,1031,1032,1034,1036,1038,1040,1042,1045,1047,1050],{"class":541,"line":579},[539,1033,546],{"class":545},[539,1035,550],{"class":549},[539,1037,554],{"class":553},[539,1039,557],{"class":549},[539,1041,554],{"class":553},[539,1043,1044],{"class":549},"Data",[539,1046,554],{"class":553},[539,1048,1049],{"class":549},"StoreOrderData",[539,1051,569],{"class":553},[539,1053,1054,1056,1058,1060,1062,1064,1066,1068,1071],{"class":541,"line":599},[539,1055,546],{"class":545},[539,1057,550],{"class":549},[539,1059,554],{"class":553},[539,1061,557],{"class":549},[539,1063,554],{"class":553},[539,1065,1044],{"class":549},[539,1067,554],{"class":553},[539,1069,1070],{"class":549},"UpdateOrderData",[539,1072,569],{"class":553},[539,1074,1075],{"class":541,"line":605},[539,1076,576],{"emptyLinePlaceholder":575},[539,1078,1079,1081,1083,1086,1088],{"class":541,"line":642},[539,1080,583],{"class":582},[539,1082,586],{"class":582},[539,1084,1085],{"class":589}," HostOrders",[539,1087,593],{"class":582},[539,1089,1090],{"class":589}," OrderRepositoryInterface\n",[539,1092,1093],{"class":541,"line":647},[539,1094,602],{"class":553},[539,1096,1097,1099,1101,1103,1105,1108,1111,1113,1116,1118],{"class":541,"line":692},[539,1098,608],{"class":582},[539,1100,611],{"class":582},[539,1102,615],{"class":614},[539,1104,618],{"class":553},[539,1106,1107],{"class":582},"private",[539,1109,1110],{"class":589}," PDO",[539,1112,630],{"class":553},[539,1114,1115],{"class":549},"db",[539,1117,636],{"class":553},[539,1119,639],{"class":553},[539,1121,1122],{"class":541,"line":726},[539,1123,576],{"emptyLinePlaceholder":575},[539,1125,1126,1128,1130,1133,1135,1137,1139,1142,1145,1147],{"class":541,"line":764},[539,1127,608],{"class":582},[539,1129,611],{"class":582},[539,1131,1132],{"class":614}," findByVatlyId",[539,1134,618],{"class":553},[539,1136,741],{"class":545},[539,1138,630],{"class":553},[539,1140,1141],{"class":549},"vatlyId",[539,1143,1144],{"class":553},"):",[539,1146,738],{"class":553},[539,1148,1149],{"class":589},"OrderInterface\n",[539,1151,1152],{"class":541,"line":807},[539,1153,1154],{"class":553},"    {\n",[539,1156,1157,1160,1163,1166,1168,1170,1173,1176,1178,1180,1183,1186,1189,1192,1195,1198,1200,1202,1204],{"class":541,"line":841},[539,1158,1159],{"class":553},"        $",[539,1161,1162],{"class":549},"query ",[539,1164,1165],{"class":553},"=",[539,1167,670],{"class":553},[539,1169,1115],{"class":549},[539,1171,1172],{"class":553},"->",[539,1174,1175],{"class":614},"prepare",[539,1177,618],{"class":553},[539,1179,678],{"class":553},[539,1181,1182],{"class":545},"SELECT",[539,1184,1185],{"class":553}," *",[539,1187,1188],{"class":545}," FROM",[539,1190,1191],{"class":681}," host_orders ",[539,1193,1194],{"class":545},"WHERE",[539,1196,1197],{"class":681}," vatly_id ",[539,1199,1165],{"class":553},[539,1201,738],{"class":681},[539,1203,678],{"class":553},[539,1205,1206],{"class":553},");\n",[539,1208,1209,1211,1214,1216,1219,1222,1224],{"class":541,"line":877},[539,1210,1159],{"class":553},[539,1212,1213],{"class":549},"query",[539,1215,1172],{"class":553},[539,1217,1218],{"class":614},"execute",[539,1220,1221],{"class":553},"([$",[539,1223,1141],{"class":549},[539,1225,1226],{"class":553},"]);\n",[539,1228,1229,1231,1234,1236,1238,1240,1242,1245,1247,1250,1253,1256],{"class":541,"line":920},[539,1230,1159],{"class":553},[539,1232,1233],{"class":549},"row ",[539,1235,1165],{"class":553},[539,1237,630],{"class":553},[539,1239,1213],{"class":549},[539,1241,1172],{"class":553},[539,1243,1244],{"class":614},"fetch",[539,1246,618],{"class":553},[539,1248,1249],{"class":589},"PDO",[539,1251,1252],{"class":553},"::",[539,1254,1255],{"class":549},"FETCH_ASSOC",[539,1257,1206],{"class":553},[539,1259,1260,1263,1265,1267,1270,1273,1275,1278,1281,1284,1286,1289,1291],{"class":541,"line":961},[539,1261,1262],{"class":666},"        return",[539,1264,630],{"class":553},[539,1266,1233],{"class":549},[539,1268,1269],{"class":553},"===",[539,1271,1272],{"class":553}," false",[539,1274,738],{"class":553},[539,1276,1277],{"class":553}," null",[539,1279,1280],{"class":553}," :",[539,1282,1283],{"class":545}," new",[539,1285,590],{"class":589},[539,1287,1288],{"class":553},"($",[539,1290,633],{"class":549},[539,1292,1206],{"class":553},[539,1294,1296],{"class":541,"line":1295},16,[539,1297,1298],{"class":553},"    }\n",[539,1300,1302],{"class":541,"line":1301},17,[539,1303,576],{"emptyLinePlaceholder":575},[539,1305,1307,1309,1311,1314,1316,1318,1320,1323,1325,1327],{"class":541,"line":1306},18,[539,1308,608],{"class":582},[539,1310,611],{"class":582},[539,1312,1313],{"class":614}," store",[539,1315,618],{"class":553},[539,1317,1049],{"class":589},[539,1319,630],{"class":553},[539,1321,1322],{"class":549},"data",[539,1324,1144],{"class":553},[539,1326,738],{"class":553},[539,1328,1149],{"class":589},[539,1330,1332],{"class":541,"line":1331},19,[539,1333,1154],{"class":553},[539,1335,1337,1339,1342,1344,1346,1348,1350,1353,1355,1357,1360,1362,1365,1368],{"class":541,"line":1336},20,[539,1338,1159],{"class":553},[539,1340,1341],{"class":549},"hostId ",[539,1343,1165],{"class":553},[539,1345,630],{"class":553},[539,1347,1322],{"class":549},[539,1349,1172],{"class":553},[539,1351,1352],{"class":549},"metadata",[539,1354,675],{"class":553},[539,1356,678],{"class":553},[539,1358,1359],{"class":681},"host_order_id",[539,1361,678],{"class":553},[539,1363,1364],{"class":553},"]",[539,1366,1367],{"class":553}," ??",[539,1369,1370],{"class":553}," null;\n",[539,1372,1374,1377,1380,1382,1384,1387],{"class":541,"line":1373},21,[539,1375,1376],{"class":666},"        if",[539,1378,1379],{"class":553}," ($",[539,1381,1341],{"class":549},[539,1383,1269],{"class":553},[539,1385,1386],{"class":553}," null)",[539,1388,1389],{"class":553}," {\n",[539,1391,1393,1396],{"class":541,"line":1392},22,[539,1394,1395],{"class":666},"            return",[539,1397,1370],{"class":553},[539,1399,1401],{"class":541,"line":1400},23,[539,1402,1403],{"class":553},"        }\n",[539,1405,1407],{"class":541,"line":1406},24,[539,1408,576],{"emptyLinePlaceholder":575},[539,1410,1412,1414,1416,1418,1420,1422,1424,1426],{"class":541,"line":1411},25,[539,1413,1159],{"class":553},[539,1415,1162],{"class":549},[539,1417,1165],{"class":553},[539,1419,670],{"class":553},[539,1421,1115],{"class":549},[539,1423,1172],{"class":553},[539,1425,1175],{"class":614},[539,1427,1428],{"class":553},"(\n",[539,1430,1432,1435,1438,1440,1443,1445,1447,1450,1452,1455,1458,1460,1462],{"class":541,"line":1431},26,[539,1433,1434],{"class":553},"            '",[539,1436,1437],{"class":545},"UPDATE",[539,1439,1191],{"class":681},[539,1441,1442],{"class":545},"SET",[539,1444,1197],{"class":681},[539,1446,1165],{"class":553},[539,1448,1449],{"class":681}," ?, ",[539,1451,496],{"class":545},[539,1453,1454],{"class":553}," =",[539,1456,1457],{"class":681}," ?, invoice_number ",[539,1459,1165],{"class":553},[539,1461,1449],{"class":681},[539,1463,1464],{"class":553},"'\n",[539,1466,1468,1471,1473,1476],{"class":541,"line":1467},27,[539,1469,1470],{"class":553},"            .",[539,1472,907],{"class":553},[539,1474,1475],{"class":681},"total = ?, currency = ?, payment_method = ?, testmode = ? ",[539,1477,1464],{"class":553},[539,1479,1481,1483,1485,1488],{"class":541,"line":1480},28,[539,1482,1470],{"class":553},[539,1484,907],{"class":553},[539,1486,1487],{"class":681},"WHERE id = ? AND vatly_id IS NULL AND testmode = ?",[539,1489,1464],{"class":553},[539,1491,1493],{"class":541,"line":1492},29,[539,1494,1495],{"class":553},"        );\n",[539,1497,1499,1501,1503,1505,1507],{"class":541,"line":1498},30,[539,1500,1159],{"class":553},[539,1502,1213],{"class":549},[539,1504,1172],{"class":553},[539,1506,1218],{"class":614},[539,1508,1509],{"class":553},"([\n",[539,1511,1513,1516,1518,1520,1522,1525,1527,1529,1531,1533,1535,1537,1539,1541,1544],{"class":541,"line":1512},31,[539,1514,1515],{"class":553},"            $",[539,1517,1322],{"class":549},[539,1519,1172],{"class":553},[539,1521,1141],{"class":549},[539,1523,1524],{"class":553},",",[539,1526,630],{"class":553},[539,1528,1322],{"class":549},[539,1530,1172],{"class":553},[539,1532,496],{"class":549},[539,1534,1524],{"class":553},[539,1536,630],{"class":553},[539,1538,1322],{"class":549},[539,1540,1172],{"class":553},[539,1542,1543],{"class":549},"invoiceNumber",[539,1545,1546],{"class":553},",\n",[539,1548,1550,1552,1554,1556,1558,1560,1562,1564,1566,1568,1570,1572,1574,1576,1579],{"class":541,"line":1549},32,[539,1551,1515],{"class":553},[539,1553,1322],{"class":549},[539,1555,1172],{"class":553},[539,1557,502],{"class":549},[539,1559,1524],{"class":553},[539,1561,630],{"class":553},[539,1563,1322],{"class":549},[539,1565,1172],{"class":553},[539,1567,505],{"class":549},[539,1569,1524],{"class":553},[539,1571,630],{"class":553},[539,1573,1322],{"class":549},[539,1575,1172],{"class":553},[539,1577,1578],{"class":549},"paymentMethod",[539,1580,1546],{"class":553},[539,1582,1584,1587,1589,1591,1593,1595,1597,1599,1601,1603,1606,1608,1610,1612,1614,1616,1618,1620,1622],{"class":541,"line":1583},33,[539,1585,1586],{"class":553},"            (",[539,1588,786],{"class":582},[539,1590,636],{"class":553},[539,1592,630],{"class":553},[539,1594,1322],{"class":549},[539,1596,1172],{"class":553},[539,1598,512],{"class":549},[539,1600,1524],{"class":553},[539,1602,630],{"class":553},[539,1604,1605],{"class":549},"hostId",[539,1607,1524],{"class":553},[539,1609,783],{"class":553},[539,1611,786],{"class":582},[539,1613,636],{"class":553},[539,1615,630],{"class":553},[539,1617,1322],{"class":549},[539,1619,1172],{"class":553},[539,1621,512],{"class":549},[539,1623,1546],{"class":553},[539,1625,1627],{"class":541,"line":1626},34,[539,1628,1629],{"class":553},"        ]);\n",[539,1631,1633,1635,1637,1640,1642,1644,1646,1648],{"class":541,"line":1632},35,[539,1634,1262],{"class":666},[539,1636,670],{"class":553},[539,1638,1639],{"class":614},"findByVatlyId",[539,1641,1288],{"class":553},[539,1643,1322],{"class":549},[539,1645,1172],{"class":553},[539,1647,1141],{"class":549},[539,1649,1206],{"class":553},[539,1651,1653],{"class":541,"line":1652},36,[539,1654,1298],{"class":553},[539,1656,1658],{"class":541,"line":1657},37,[539,1659,576],{"emptyLinePlaceholder":575},[539,1661,1663,1665,1667,1670,1672,1674,1676,1679,1681,1684,1686,1688,1690],{"class":541,"line":1662},38,[539,1664,608],{"class":582},[539,1666,611],{"class":582},[539,1668,1669],{"class":614}," update",[539,1671,618],{"class":553},[539,1673,478],{"class":589},[539,1675,630],{"class":553},[539,1677,1678],{"class":549},"order",[539,1680,1524],{"class":553},[539,1682,1683],{"class":589}," UpdateOrderData",[539,1685,630],{"class":553},[539,1687,1322],{"class":549},[539,1689,1144],{"class":553},[539,1691,596],{"class":589},[539,1693,1695],{"class":541,"line":1694},39,[539,1696,1154],{"class":553},[539,1698,1700,1702,1704,1706,1708,1710,1712,1714],{"class":541,"line":1699},40,[539,1701,1159],{"class":553},[539,1703,1162],{"class":549},[539,1705,1165],{"class":553},[539,1707,670],{"class":553},[539,1709,1115],{"class":549},[539,1711,1172],{"class":553},[539,1713,1175],{"class":614},[539,1715,1428],{"class":553},[539,1717,1719,1721,1723,1725,1727,1730,1732,1734,1736,1739,1741,1743],{"class":541,"line":1718},41,[539,1720,1434],{"class":553},[539,1722,1437],{"class":545},[539,1724,1191],{"class":681},[539,1726,1442],{"class":545},[539,1728,1729],{"class":545}," status",[539,1731,1454],{"class":553},[539,1733,1457],{"class":681},[539,1735,1165],{"class":553},[539,1737,1738],{"class":681}," ?, total ",[539,1740,1165],{"class":553},[539,1742,1449],{"class":681},[539,1744,1464],{"class":553},[539,1746,1748,1750,1752,1755],{"class":541,"line":1747},42,[539,1749,1470],{"class":553},[539,1751,907],{"class":553},[539,1753,1754],{"class":681},"currency = ?, payment_method = ? WHERE vatly_id = ?",[539,1756,1464],{"class":553},[539,1758,1760],{"class":541,"line":1759},43,[539,1761,1495],{"class":553},[539,1763,1765,1767,1769,1771,1773],{"class":541,"line":1764},44,[539,1766,1159],{"class":553},[539,1768,1213],{"class":549},[539,1770,1172],{"class":553},[539,1772,1218],{"class":614},[539,1774,1509],{"class":553},[539,1776,1778,1780,1782,1784,1787,1790,1792,1794,1796,1798],{"class":541,"line":1777},45,[539,1779,1515],{"class":553},[539,1781,1322],{"class":549},[539,1783,1172],{"class":553},[539,1785,1786],{"class":549},"status ",[539,1788,1789],{"class":553},"??",[539,1791,630],{"class":553},[539,1793,1678],{"class":549},[539,1795,1172],{"class":553},[539,1797,898],{"class":614},[539,1799,1800],{"class":553},"(),\n",[539,1802,1804,1806,1808,1810,1813,1815,1817,1819,1821,1824],{"class":541,"line":1803},46,[539,1805,1515],{"class":553},[539,1807,1322],{"class":549},[539,1809,1172],{"class":553},[539,1811,1812],{"class":549},"invoiceNumber ",[539,1814,1789],{"class":553},[539,1816,630],{"class":553},[539,1818,1678],{"class":549},[539,1820,1172],{"class":553},[539,1822,1823],{"class":614},"getInvoiceNumber",[539,1825,1800],{"class":553},[539,1827,1829,1831,1833,1835,1838,1840,1842,1844,1846,1849],{"class":541,"line":1828},47,[539,1830,1515],{"class":553},[539,1832,1322],{"class":549},[539,1834,1172],{"class":553},[539,1836,1837],{"class":549},"total ",[539,1839,1789],{"class":553},[539,1841,630],{"class":553},[539,1843,1678],{"class":549},[539,1845,1172],{"class":553},[539,1847,1848],{"class":614},"getTotal",[539,1850,1800],{"class":553},[539,1852,1854,1856,1858,1860,1863,1865,1867,1869,1871,1874],{"class":541,"line":1853},48,[539,1855,1515],{"class":553},[539,1857,1322],{"class":549},[539,1859,1172],{"class":553},[539,1861,1862],{"class":549},"currency ",[539,1864,1789],{"class":553},[539,1866,630],{"class":553},[539,1868,1678],{"class":549},[539,1870,1172],{"class":553},[539,1872,1873],{"class":614},"getCurrency",[539,1875,1800],{"class":553},[539,1877,1879,1881,1883,1885,1888,1890,1892,1894,1896,1899],{"class":541,"line":1878},49,[539,1880,1515],{"class":553},[539,1882,1322],{"class":549},[539,1884,1172],{"class":553},[539,1886,1887],{"class":549},"paymentMethod ",[539,1889,1789],{"class":553},[539,1891,630],{"class":553},[539,1893,1678],{"class":549},[539,1895,1172],{"class":553},[539,1897,1898],{"class":614},"getPaymentMethod",[539,1900,1800],{"class":553},[539,1902,1904,1906,1908,1910,1913],{"class":541,"line":1903},50,[539,1905,1515],{"class":553},[539,1907,1678],{"class":549},[539,1909,1172],{"class":553},[539,1911,1912],{"class":614},"getVatlyId",[539,1914,1800],{"class":553},[539,1916,1918],{"class":541,"line":1917},51,[539,1919,1629],{"class":553},[539,1921,1923,1925,1927,1929,1931,1933,1935,1937],{"class":541,"line":1922},52,[539,1924,1262],{"class":666},[539,1926,670],{"class":553},[539,1928,1639],{"class":614},[539,1930,1288],{"class":553},[539,1932,1678],{"class":549},[539,1934,1172],{"class":553},[539,1936,1912],{"class":614},[539,1938,1939],{"class":553},"())\n",[539,1941,1943,1946,1949,1951,1954,1956,1958,1961,1963],{"class":541,"line":1942},53,[539,1944,1945],{"class":553},"            ??",[539,1947,1948],{"class":666}," throw",[539,1950,1283],{"class":545},[539,1952,1953],{"class":589}," RuntimeException",[539,1955,618],{"class":553},[539,1957,678],{"class":553},[539,1959,1960],{"class":681},"Host order disappeared during update",[539,1962,678],{"class":553},[539,1964,1206],{"class":553},[539,1966,1968],{"class":541,"line":1967},54,[539,1969,1298],{"class":553},[539,1971,1973],{"class":541,"line":1972},55,[539,1974,964],{"class":553},[472,1976,1977,1980,1981,1984,1985,1987,1988,1991],{},[476,1978,1979],{},"store()"," here means attach the Vatly ID and confirm an existing row, not insert. Once attached, the built-in reaction finds that ID and calls ",[476,1982,1983],{},"update()"," on redelivery. The wrapper includes every current ",[476,1986,478],{}," method, including ",[476,1989,1990],{},"isTestmode()",".",[472,1993,1994,1995,1998,1999,2001,2002,2004],{},"This minimal adapter stores order summary fields only. Extend your writer to save subtotal, tax summary, metadata, cancellation reason, and lines if your host needs them. Do not overwrite fields when an update DTO leaves them ",[476,1996,1997],{},"null",". Use ",[977,2000,50],{"href":197}," to make attachment, audit, and fulfillment atomic. Missing routing data may return ",[476,2003,1997],{},"; database failures must throw.",[525,2006,2008],{"id":2007},"route-renewals-separately","Route renewals separately",[472,2010,2011,2012,2015],{},"An initial payment often points to a host order already created by checkout. A renewal may need a new host order. Confirm the initial row when its metadata ID matches. Otherwise, resolve the host customer from ",[476,2013,2014],{},"$data->hostCustomerId"," and use your host's renewal service only when you can establish the subscription and payment relationship.",[472,2017,2018,2019,2021],{},"Missing metadata alone is not proof of a renewal. It can also mean an anonymous payment, a deleted order, or another integration. Check storefront, mode, and ownership; return ",[476,2020,1997],{}," or send the event for reconciliation when it cannot be routed. Give renewal creation a unique Vatly order ID so retries cannot insert twice.",[472,2023,2024,2025,2028,2029,2031,2032,2035,2036,1991],{},"Use the same pattern for subscriptions: a wrapper implementing ",[476,2026,2027],{},"SubscriptionInterface",", a unique Vatly ID, and a repository that applies partial updates and explicit clear flags. See ",[977,2030,177],{"href":178}," and ",[977,2033,2034],{"href":201},"Event flow",". Full payload fields are in the ",[977,2037,280],{"href":2038,"rel":2039},"https:\u002F\u002Fdocs.vatly.com\u002Fapi-reference",[2040],"nofollow",[2042,2043,2044],"style",{},"html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":535,"searchDepth":572,"depth":572,"links":2046},[2047,2048,2049],{"id":527,"depth":572,"text":528},{"id":967,"depth":572,"text":968},{"id":2007,"depth":572,"text":2008},"Reuse an application's existing orders instead of creating parallel Fluent tables.","md",null,{},{"title":204},{"title":467,"description":2050},"AzMErf6eqmn80m024By5MlQ1i582oxpKXz3Zs0Wr-pk",[2058,2060],{"title":200,"path":201,"stem":202,"description":2059,"children":-1},"Choose the event that matches your task.",{"title":58,"path":208,"stem":209,"description":2061,"children":-1},"Test your application's checkout decisions without making a request to Vatly.",1794594923717]