Skip to content

Instantly share code, notes, and snippets.

View fernandobandeira's full-sized avatar
🎯
Focused

Fernando Henrique Bandeira fernandobandeira

🎯
Focused
View GitHub Profile
mock.onGet('http://localhost:3300/products').reply(200, {
products: [
{
'_id': '59cd6d6ef3545e02ad7595c7',
}
]
});
@fernandobandeira
fernandobandeira / recorrente.php
Last active February 1, 2017 12:41
Exemplo recorrente
<?php
try {
$plan = PagSeguroRecorrente::sendPreApprovalRequest([
'preApprovalName' => 'Téste',
'preApprovalCharge' => 'auto',
'preApprovalPeriod' => 'MONTHLY',
'preApprovalAmountPerPayment' => 10.00,
]);
PagSeguroRecorrente::setPlan($plano)
/* Submit do form */
handleSubmit();
function handleSubmit() {
$('#formPayment').one('submit', function(e) {
$('#senderHash').val(PagSeguroDirectPayment.getSenderHash());
if ($('.nav-tabs .active').prop('id') == 'presCredit_card') {
e.preventDefault();
if ($('#installments').val() == 'Escolha a forma de parcelamento') {