To integrate with Express Checkout have your API credentials ready and read on.
Step 1 - Send your transaction data to PayPal (your API credentials are required for safety):
#!/bin/sh -e | |
# Running this script will disable the on-access (real-time) scanner in F-Secure Anti-Virus for Mac | |
# while preserving the ability to use the on-demand (manual) scanner. | |
# | |
# Note that this *will* make the UI persistently tell you that there is a problem with real-time | |
# scanning. Which is true, because you disabled it. :-) | |
# | |
# NOTE THAT THIS WILL MAKE YOUR COMPUTER UNPROTECTED. DO THIS AT YOUR OWN RISK! | |
# NOTE THAT THIS WILL MAKE A BACKUP COPY IN YOUR "Documents" FOLDER. KEEP IT. | |
# NOTE THAT THIS IS AN UNSUPPORTED HACK. IT MAY STOP WORKING AT ANY TIME. |
To integrate with Express Checkout have your API credentials ready and read on.
Step 1 - Send your transaction data to PayPal (your API credentials are required for safety):
public abstract class JdbiIntegrationTest { | |
private DBI dbi; | |
private Handle handle; | |
private Liquibase liquibase; | |
protected abstract DatabaseConfiguration getDatabaseConfiguration(); |
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>PUT</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedMethod>HEAD</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>*</AllowedHeader> |
; Why Clojure? | |
; | |
; * Interactive | |
; * Succinct | |
; * Consistent | |
; * Java interoperability | |
; Try Clojure is an online "repl", where you can try out Clojure expressions. | |
; http://tryclj.com/ |
(ns foobar.components | |
(:require [com.stuartsierra.component :as component] | |
[compojure.api.sweet :refer :all])) | |
(defmethod compojure.api.meta/restructure-param :components | |
[_ components acc] | |
(update-in acc [:letks] into [components `(::components ~'+compojure-api-request+)])) | |
(defn wrap-components [handler components] | |
(fn [req] |
(defrecord Server [service-map] | |
component/Lifecycle | |
(start [component] | |
(info :msg "Starting server.") | |
(let [server (bootstrap/create-server (:service-map service-map))] | |
(bootstrap/start server) | |
(assoc component :server server))) | |
(stop [component] | |
(info :msg "Stopping server.") | |
(update-in component [:server] bootstrap/stop))) |
I ran into an issue today where I had to perform a bulk insert into a postgres DB. I was already using SQLAlchemy and Flask-SQLAlchemy to manage the connections to the db and I didn't want to have to use things like psycopg2
directly.
Note: SQLAlchemy provides an ORM. It isn't just an ORM. That is an important thing to be kept in mind. This means that you can bypass choose to not use the ORM layer when you don't want it. The idea with an ORM is to track changes to objects and when you have a case like that is when you'd use the ORM. In a bulk upload scenario, you don't need to track changes to objects. All you care is that everything be pushed into the DB.