Пример #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)