Skip to content

Instantly share code, notes, and snippets.

@goltsevnet
Created October 9, 2020 17:44
Show Gist options
  • Select an option

  • Save goltsevnet/f5f32ccf8d6f854ee102ae62de6f0638 to your computer and use it in GitHub Desktop.

Select an option

Save goltsevnet/f5f32ccf8d6f854ee102ae62de6f0638 to your computer and use it in GitHub Desktop.
yandex payment individual react
payHandle(e) {
e.preventDefault();
this.myFormTargets.current.value = 'test'
this.myForm.current.submit()
}
<form ref={this.payHandle} className='pay' method="POST" action='https://money.yandex.ru/quickpay/confirm.xml' onSubmit={this.payHandle}>
<input type="hidden" name="receiver" value="41001261102xxxx"/>
<input type="hidden" name="formcomment" value={boostInfoPay}/>
<input type="hidden" name="short-dest" value={boostInfoPay}/>
<input type="hidden" name="label" value={code ? code : ''}/>
<input type="hidden" name="quickpay-form" value="shop"/>
<input type="hidden" ref={this.myFormTargets} name="targets" value={code ? code : ''}/>
<input type="hidden" name="sum" value={this.state.totalCheck} datatype="number"/>
<input type="hidden" name="paymentType" value="AC"/>
<input type="hidden" name="Accept-Language" value="en"/>
<input disabled={false} type="submit" value={`Pay $${this.state.totalCheck}`}/>
<div className='totalPrice'>
<span className={Math.sign(parseInt(sliderPercent)) === -1 ? 'text-red' : 'text-green'}>
{Math.sign(sliderPercent) !== -1 ? '+' : null}
{sliderPercent}%
</span>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment