示例#1
0
from paypalrestsdk import Authorization
import logging
logging.basicConfig(level=logging.INFO)

authorization = Authorization.find("5RA45624N3531924N")
capture = authorization.capture({
    "amount": {
        "currency": "USD",
        "total": "4.54"
    },
    "is_final_capture": True
})

if capture.success():
    print("Capture[%s] successfully" % (capture.id))
else:
    print(capture.error)
from paypalrestsdk import Authorization

import logging
logging.basicConfig(level=logging.INFO)

authorization = Authorization.find("7GH53639GA425732B")

authorization.amount = {
    "currency": "USD",
    "total": "7.00"}

if authorization.reauthorize():
    print("Reauthorized[%s] successfully" % (authorization.id))
else:
    print(authorization.error)
示例#3
0
from paypalrestsdk import Authorization
import logging
logging.basicConfig(level=logging.INFO)

authorization = Authorization.find("6CR34526N64144512")

if authorization.void():
    print("Void authorization successfully")
else:
    print((authorization.error))
示例#4
0
from paypalrestsdk import Authorization
import logging
logging.basicConfig(level=logging.INFO)

authorization = Authorization.find("5RA45624N3531924N")
capture = authorization.capture({
  "amount": {
    "currency": "USD",
    "total": "4.54" },
  "is_final_capture": True })

if capture.success():
  print("Capture[%s] successfully"%(capture.id))
else:
  print(capture.error)
示例#5
0
from paypalrestsdk import Authorization

import logging
logging.basicConfig(level=logging.INFO)

authorization = Authorization.find("7GH53639GA425732B")

authorization.amount = {"currency": "USD", "total": "7.00"}

if authorization.reauthorize():
    print("Reauthorized[%s] successfully" % (authorization.id))
else:
    print(authorization.error)
示例#6
0
from paypalrestsdk import Authorization, ResourceNotFound
import logging

logging.basicConfig(level=logging.INFO)

try:
    authorization = Authorization.find("99M58264FG144833V")
    print("Got Authorization details for Authorization[%s]" %
          (authorization.id))

except ResourceNotFound as error:
    print("Authorization Not Found")
示例#7
0
from paypalrestsdk import Authorization, ResourceNotFound
import logging
logging.basicConfig(level=logging.INFO)

try:
  authorization = Authorization.find("99M58264FG144833V")
  print("Got Authorization details for Authorization[%s]"%(authorization.id))

except ResourceNotFound as error:
  print("Authorization Not Found")
示例#8
0
from paypalrestsdk import Authorization
import logging
logging.basicConfig(level=logging.INFO)

authorization = Authorization.find("6CR34526N64144512")

if authorization.void():
  print("Void authorization successfully")
else:
  print(authorization.error)