> For the complete documentation index, see [llms.txt](https://angus.elektraweb.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://angus.elektraweb.com/group-4/scriptler/odeme-linki-beforesave-script.md).

# Ödeme Linki BeforeSave Script

### Ödeme Linki BeforeSave Script

```
let data = this.recordService.formGroup.getRawValue();
if (!data.PHONE && !data.EMAIL) {
  let msg = angus.languageService.dynamicTranslator.translate(
    'You must enter a phone number or email'
  );
  throw new Error(msg);
}

let jsonData = {
  HotelId: angus.api.tenant.HOTELID,
  Email: data.EMAIL || '',
  Phone: data.PHONE || '',
  Price: +data.PRICE,
  PriceCurrency: data.CURRENCYID_CURCODE || angus.api.tenant.DEFAULTCURRENCY,
  payDescription: data.NOTES,
};
this.recordService.formGroup.controls.SIMPLERESERVATIONJSON.setValue(
  JSON.stringify(jsonData)
);
```
