Replace paypal custom json " with `

This commit is contained in:
Tanner Collin 2022-07-12 06:13:18 +00:00
parent cebe0a8c87
commit 281493ad25
2 changed files with 4 additions and 4 deletions

View File

@ -313,7 +313,7 @@ def process_paypal_ipn(data):
return False return False
try: try:
custom_json = json.loads(data.get('custom', '')) custom_json = json.loads(data.get('custom', '').replace('`', '"'))
except (KeyError, ValueError): except (KeyError, ValueError):
custom_json = {} custom_json = {}

View File

@ -13,7 +13,7 @@ export function PayPalPayNow(props) {
<input type='hidden' name='lc' value='CA' /> <input type='hidden' name='lc' value='CA' />
<input type='hidden' name='item_name' value={name} /> <input type='hidden' name='item_name' value={name} />
<input type='hidden' name='amount' value={amount} /> <input type='hidden' name='amount' value={amount} />
<input type='hidden' name='custom' value={custom} /> <input type='hidden' name='custom' value={custom.replace(/\"/g, '`')} />
<input type='hidden' name='currency_code' value='CAD' /> <input type='hidden' name='currency_code' value='CAD' />
<input type='hidden' name='button_subtype' value='services' /> <input type='hidden' name='button_subtype' value='services' />
<input type='hidden' name='no_note' value='0' /> <input type='hidden' name='no_note' value='0' />
@ -40,7 +40,7 @@ export function PayPalSubscribe(props) {
<input type='hidden' name='no_note' value='1' /> <input type='hidden' name='no_note' value='1' />
<input type='hidden' name='src' value='1' /> <input type='hidden' name='src' value='1' />
<input type='hidden' name='a3' value={amount} /> <input type='hidden' name='a3' value={amount} />
<input type='hidden' name='custom' value={custom} /> <input type='hidden' name='custom' value={custom.replace(/\"/g, '`')} />
<input type='hidden' name='p3' value='1' /> <input type='hidden' name='p3' value='1' />
<input type='hidden' name='t3' value='M' /> <input type='hidden' name='t3' value='M' />
<input type='hidden' name='currency_code' value='CAD' /> <input type='hidden' name='currency_code' value='CAD' />
@ -68,7 +68,7 @@ export function PayPalSubscribeDeal(props) {
<input type='hidden' name='t1' value='M' /> <input type='hidden' name='t1' value='M' />
<input type='hidden' name='src' value='1' /> <input type='hidden' name='src' value='1' />
<input type='hidden' name='a3' value={amount} /> <input type='hidden' name='a3' value={amount} />
<input type='hidden' name='custom' value={custom} /> <input type='hidden' name='custom' value={custom.replace(/\"/g, '`')} />
<input type='hidden' name='p3' value='1' /> <input type='hidden' name='p3' value='1' />
<input type='hidden' name='t3' value='M' /> <input type='hidden' name='t3' value='M' />
<input type='hidden' name='currency_code' value='CAD' /> <input type='hidden' name='currency_code' value='CAD' />