0

This is my code:

def test(request):
    paypalrestsdk.configure({
      "mode": "security-test-sandbox",
        "client_id": "XXXXXXX-XXXX-XXXX-XXXX",
        "client_secret": "XXXXXXX-XXXX-XXXX-XXXX"  })

    payment = paypalrestsdk.Payment({
      "intent": "sale",
      "payer": {
        "payment_method": "credit_card",
        "funding_instruments": [{
          "credit_card": {
            "type": "visa",
            "number": "4417119669820331",
            "expire_month": "11",
            "expire_year": "2018",
            "cvv2": "874",
            "first_name": "Joe",
            "last_name": "Shopper" }}]},
      "transactions": [{
        "item_list": {
          "items": [{
            "name": "item",
            "sku": "item",
            "price": "1.00",
            "currency": "USD",
            "quantity": 1 }]},
        "amount": {
          "total": "1.00",
          "currency": "USD" },
        "description": "This is the payment transaction description." }]})

    if payment.create():
      print("Payment created successfully")
    else:
      print(payment.error)
    return render(request, "test.html")

When performing the command payment.create() the error is:
[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)
I'm using Mac.

red0ct
  • 4,840
  • 3
  • 17
  • 44
jack lucky
  • 39
  • 2
  • 8
  • This has nothing to do with the solution but you shouldn't be using SSLv3 or any SSL due to security reasons. You should be using TSL. In any case, there is a [solution](http://stackoverflow.com/questions/35405092/sslerror-sslv3-alert-handshake-failure) to a question similar to this (`sslv3 alert handshake failure (-ssl.c:590)`) – Keenan Lawrence Jun 23 '16 at 13:53
  • 1
    how can I use TSL, please show me how!! – jack lucky Jun 24 '16 at 02:07
  • [This](http://stackoverflow.com/questions/35405092/sslerror-sslv3-alert-handshake-failure?lq=1) might be useful to you. – Keenan Lawrence Jul 01 '16 at 12:31

0 Answers0