Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTransactionNotFound = errors.New("pdt: transaction not found")
)
Errors
Functions ¶
This section is empty.
Types ¶
type Email ¶
func (*Email) UnmarshalText ¶
type Time ¶
func (*Time) UnmarshalText ¶
type Transaction ¶
type Transaction struct { ID string `schema:"txn_id"` Type string `schema:"txn_type"` Subject string `schema:"transaction_subject"` Business Email `schema:"business"` Custom string `schema:"custom"` Invoice string `schema:invoice` ReceiptID string `schema:receipt_ID` FirstName string `schema:"first_name"` HandlingAmount float64 `schema:"handling_amount"` ItemNumber string `schema:"item_number"` ItemName string `schema:"item_name"` LastName string `schema:"last_name"` MerchantCurrency string `schema:"mc_currency"` MerchantFee float64 `schema:"mc_fee"` MerchantGross float64 `schema:"mc_gross"` PayerEmail Email `schema:"payer_email"` PayerID string `schema:"payer_id"` PayerStatus string `schema:"payer_status"` PaymentDate Time `schema:"payment_date"` PaymentFee float64 `schema:"payment_fee"` PaymentGross float64 `schema:"payment_gross"` PaymentStatus string `schema:"payment_status"` PaymentType string `schema:"payment_type"` ProtectionEligibility string `schema:"protection_eligibility"` Quantity int64 `schema:"quantity"` ReceiverID string `schema:"receiver_id"` ReceiverEmail Email `schema:"receiver_email"` ResidenceCountry string `schema:"residence_country"` Shipping float64 `schema:"shipping"` Tax float64 `schema:"tax"` AddressCountry string `schema:"address_country"` TestIPN int64 `schema:"test_ipn"` AddressStatus string `schema:"address_status"` AddressStreet string `schema:"address_street"` NotifyVersion float64 `schema:"notify_version"` AddressCity string `schema:"address_city"` VerifySign string `schema:"verify_sign"` AddressState string `schema:"address_state"` Charset string `schema:"charset"` AddressName string `schema:"address_name"` AddressCountryCode string `schema:"address_country_code"` AddressZip int64 `schema:"address_zip"` SubscriberID string `schema:"subscr_id"` TestPDT int64 `schema:"test_pdt"` }
Transaction is a PDT transaction. See https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables.
BUG(arthurwhite): Can't handle multiple items from a shopping cart transaction.
func ParseTransaction ¶
func ParseTransaction(r io.Reader) (*Transaction, error)
func ReadNotification ¶
func ReadNotification(vals url.Values) *Transaction
ReadNotification reads a notification from an //IPN request
Notes ¶
Bugs ¶
Can't handle multiple items from a shopping cart transaction.
Click to show internal directories.
Click to hide internal directories.