Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save TrywaR/5581e887bc7f67531fa3a46f78689760 to your computer and use it in GitHub Desktop.
Save TrywaR/5581e887bc7f67531fa3a46f78689760 to your computer and use it in GitHub Desktop.
Форма для оплаты через хуяндекс метод почта вроде под MODX REVO MiniShop2
{if $payment.id != 1 }
<form action="https://money.yandex.ru/eshop.xml" method="post">
<input name="shopId" value="" type="hidden"/>
<input name="scid" value="" type="hidden"/>
<input name="sum" value="{$total.cost | replace : ' ' : '' | number : 2 : '.' : ''}" type="hidden" min="1">
<input name="customerNumber" value="{$address.phone}" type="hidden"/>
<input name="orderNumber" value="{$order.num}" type="hidden"/>
<input name="custAddr" value="{$order.address}" type="hidden"/>
<input name="cps_phone" value="{$address.phone}" type="hidden"/>
<input name="cps_email" value="{$user.email}" type="hidden"/>
{var $i = 0}
{var $ym_merchant_receipt }
{
"customerContact": "+{$address.phone | number | replace : ',' : ''}",
"taxSystem": 1,
"items": [
{foreach $products as $product}
{
"quantity": {$product.count},
"price": {
"amount": {$product.price | replace : ' ' : '' | number : 2 : '.' : ''}
},
"tax": 3,
"text": "{$product.pagetitle | escape }",
"paymentMethodType": "full_prepayment ",
"paymentSubjectType": "commodity"
}
{var $i = $i + 1}
{if $i != ($products | count)}
,
{/if}
{/foreach}]
}
{/var}
<input name="ym_merchant_receipt" value='{$ym_merchant_receipt | strip : true }' type="hidden"/>
<button type="submit" name="button">
Оплатить
</button>
</form>
{/if}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment