Ejemplo n.º 1
0
 def get_order(order_id, paypal_mode, paypal_client_id,
               paypal_client_secret):
     return Order.find(resource_id=order_id,
                       api=Api({
                           'mode': paypal_mode,
                           'client_id': paypal_client_id,
                           'client_secret': paypal_client_secret
                       }))
Ejemplo n.º 2
0
from paypalrestsdk import Order, ResourceNotFound
import logging

logging.basicConfig(level=logging.INFO)

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

except ResourceNotFound as error:
    print("Order Not Found")
Ejemplo n.º 3
0
from paypalrestsdk import Order
import logging
logging.basicConfig(level=logging.INFO)

order = Order.find("<ORDER_ID>")

response = order.authorize({"amount": {"currency": "USD", "total": "0.08"}})

if order.success():
    print(("Authorized[%s] successfully" % (order.id)))
else:
    print((order.error))
Ejemplo n.º 4
0
from paypalrestsdk import Order
import logging
logging.basicConfig(level=logging.INFO)

order = Order.find("<ORDER_ID>")

response = order.authorize({
    "amount": {
        "currency": "USD",
        "total": "0.08"
    }  
  })

if order.success():
  print("Authorized[%s] successfully"%(order.id))
else:
  print(order.error)
Ejemplo n.º 5
0
from paypalrestsdk import Order, ResourceNotFound
import logging
logging.basicConfig(level=logging.INFO)

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

except ResourceNotFound as error:
    print("Order Not Found")
Ejemplo n.º 6
0
from paypalrestsdk import Order
import logging
logging.basicConfig(level=logging.INFO)

order = Order.find("O-0FJ734297A068505V")

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