I am currently facing a challenge that I could use some assistance with. My dilemma involves integrating a new payment system, and I seem to be encountering some obstacles. Here is a snippet of what I have:
options: PaystackOptions= {
amount: 5000,
email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2451574156644149454d480a474b49">[email protected]</a>',
ref: `'some code that generate random stuff'`
Although some methods work, I am facing difficulties when attempting to assign values from a form. The problem lies in how to successfully assign form values to the above structure in order for it to function properly. Despite the presence of values when I console log the form, the integration is not successful.
In my onSubmit method, which is where the payment is initiated with a button, I attempted to assign values like this:
this.options.amount = this.donateForm.value['amount'];
this.options.email = this.donateForm.value['email'];
Even though this.options.amount displays the correct value when console logged, it fails to pass to options upon assignment. I understand that this explanation may be lacking in clarity, but any assistance on this matter would be greatly appreciated.