This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function print(obj) { | |
console.log('string' === typeof obj ? obj : JSON.stringify(obj, null, 4)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Not properly setting merchant status | |
- not saving DOB month, dob day, address | |
curl https://api.balancedpayments.com/customers \ | |
-H "Accept: application/vnd.api+json;revision=1.1" \ | |
-u ak-test-2eKlj1ZDfAcZSARMf3NMhBHywDej0avSY: \ | |
-d "name=Henry Ford" \ | |
-d "dob_year=1985" \ | |
-d "dob_month=7" \ | |
-d "address[postal_code]=48120" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework import serializers | |
from gandalf.models import Application | |
class ApplicationSerializer(serializers.ModelSerializer): | |
class Meta: | |
model = Application | |
fields = ("id", "created_at", "merchant_uri", "api_key", | |
"status", 'owner_email', 'business_type', 'full_name', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'balanced' | |
Balanced.configure('ak-test-2q80HU8DISm2atgm0iRKRVIePzDb34qYp') | |
card = Balanced::Card.new( | |
:cvv => '123', | |
:expiration_month => '12', | |
:expiration_year => '2020', | |
:number => '5105105105105100' | |
).save | |
card.debit(:amount=>1000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id "AT6llWZA1DTEla6tSIxNfW0w" string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Worflow: | |
DASHBOARD | |
1) User submitts info | |
BAPI | |
2) if underwritten, we make POST to create API (oterhwise ask for diff info) | |
3) BAPI returns a merchant-uri and api-key | |
Purgatory (new app) | |
4) Store merchant-uri, api-ley and collected form info (excluding sensative inf0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Balanced; | |
using System.Collections.Generic; | |
using Balanced.Exceptions; | |
using System.Text; | |
using System.IO; | |
using Moq; | |
using System.Net; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Balanced; | |
using System.Collections.Generic; | |
using Balanced.Exceptions; | |
using System.Text; | |
using System.IO; | |
using Moq; | |
using System.Net; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
card = json.loads( | |
storage['card_create_creditable']['response'] | |
) | |
card_credits_href = card['links']['cards.credits'].replace('{cards.id}', card['cards'][0]['id']) | |
order = json.loads( | |
storage['order_create']['response'] | |
)['orders'][0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create migration file | |
$ alembic revision -m "Name of migration" | |
# Run the migration | |
$ alembic upgrade head |