Closed avinashpothula closed 7 years ago
Please check into PayPal Instant Payment Notification(IPN).
thanks xiaoleih how to store payment details in my local database in java
@avinashpothula The information of payment detail will be sent to your server. It's up to you to extract the info from each field and store in your database properly. We are unfortunately not in the position to assist you to this extend. Please check online Java tutorials on respective topics.
i am new to web development can you suggest me . how can i do paypal pay now or buy now button in java .can you please reply. i serached lots of documentrys but i did not get proper answers.
How about a button in JavaScript? https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/add-paypal-button/
HTTP Status 500 - AccessToken cannot be null or empty
type Exception report
message AccessToken cannot be null or empty
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.IllegalArgumentException: AccessToken cannot be null or empty com.paypal.base.rest.PayPalResource.configureAndExecute(PayPalResource.java:286) com.paypal.base.rest.PayPalResource.configureAndExecute(PayPalResource.java:228) com.paypal.api.payments.Payment.create(Payment.java:340) com.paypal.api.payments.servlet.PaymentWithPayPalServlet.createPayment(PaymentWithPayPalServlet.java:162) com.paypal.api.payments.servlet.PaymentWithPayPalServlet.doPost(PaymentWithPayPalServlet.java:60) com.paypal.api.payments.servlet.PaymentWithPayPalServlet.doGet(PaymentWithPayPalServlet.java:52) javax.servlet.http.HttpServlet.service(HttpServlet.java:622) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) note The full stack trace of the root cause is available in the Apache Tomcat/8.0.41 logs.
Apache Tomcat/8.0.41
any one help me , i am using paypal rest api
Here are some instructions for making your first API call https://github.com/paypal/PayPal-Java-SDK/wiki/Making-First-Call
Your error is related to your REST API credentials. Can you create an issue in our Java SDK repository with a code example of what you are doing https://github.com/paypal/PayPal-Java-SDK?
thank you randy for giving response my question. i followed instruction i get AccessToken . but not getting responce my responce is Response code: 500 Error response: java.lang.NullPointerException and request is{ "intent": "sale", "payer": { "payment_method": "paypal" }, "transactions": [ { "amount": { "currency": "USD", "total": "7", "details": { "subtotal": "5", "shipping": "1", "tax": "1" } }, "description": "This is the payment transaction description.", "item_list": { "items": [ { "name": "Ground Coffee 40 oz", "quantity": "1", "price": "5", "currency": "USD" } ] } } ], "redirect_urls": { "return_url": "http://localhost:8080/PayPalTest/paymentwithpaypal?guid\u003d07d51076ac25425d9be0040bb42588db", "cancel_url": "http://localhost:8080/PayPalTest/paymentwithpaypal?guid\u003d07d51076ac25425d9be0040bb42588db" } }
i getiing one more error is Response code: 500 Error response:
Response code: 415 Error response: Server returned HTTP response code: 415 for URL: https://api.sandbox.paypal.com/v1/oauth2/token what was it means
With a 415 I think you should review your request body and ensure you are sending a header with content-type=text/json
.
ok thanks randy . now its working fine . but when i use credit cards payment it shows an error Response code: 400 Error response: {"name":"CREDIT_CARD_CVV_CHECK_FAILED","message":"The credit card CVV check failed","information_link":"https://developer.paypal.com/docs/api/payments/#errors","debug_id":"4f331682f6e3"}
can you tell me what was that error. i give cvv no is 0123. but it does not take that cvv . it take 83 i did not define cvv number any where
cvv2 should be 3 digits for Visa and MasterCards. Please try 123 instead.
We’re sorry Things don’t appear to be working at the moment.
when i give my sandbox credentials i getting thsi any one help me how to solve this
"NetworkError: 400 Bad Request - https://www.sandbox.paypal.com/webapps/hermes/api/batch/setbuyer"
what was that error can you tell me how can i fix that
You need to use a different account as a buyer account. The account I see being used is the same receiving the payment.
thankes randy for responding my issues
i did not fix that problem i giving my client id and secret id still i getting same issue. where do i change merchant credentials . tell me how can i fix this issue
Paypal Java SDK - how do I configure the .properties File?
This wiki page will help with the .properties file https://github.com/paypal/PayPal-Java-SDK/wiki/What-happened-to-sdk_config.properties.
If you have further questions, please file them in the Java repository here: https://github.com/paypal/PayPal-Java-SDK/issues.
hi randy
my sdk config properies
acct1.CertPath=src/test/resources/sdk-cert.p12 acct1.CertKey=password acct1.AppId= APP-80W284485P519543T
acct1.UserName =exaact.test-facilitator_api1.gmail.com acct1.Password=QVGRELNVTRJW8CR9 acct1.Signature =AFcWxV21C7fd0v3bYYYRCpSSRl31AESi3WLKIdTEilJ8dD07IPl.99yP acct1.AppId= APP-80W284485P519543T
http.ConnectionTimeOut=5000 http.Retry=2 http.ReadTimeOut=30000 http.MaxConnection=100 http.IPAddress=127.0.0.1
http.ProxyPort=8080 http.ProxyHost=127.0.0.1 http.UseProxy=false http.ProxyUserName=null http.ProxyPassword=null
http.GoogleAppEngine = false
service.EndPoint=https://svcs.sandbox.paypal.com/ openid.RedirectUri=https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize
service.TestSvcsEndPoint=https://test-svcs.sandbox.paypal.com service.TestApi3tEndPoint=https://test-api-3t.sandbox.paypal.com service.TestIpnpbEndPoint=https://test-ipnpb.sandbox.paypal.com service.TestApisEndPoint=https://test-apis.sandbox.paypal.com
clientId=ASHkLGkejXZp3x9LW4E1WCIT6ebCjKZHHOCok-XrlHjpGmkapgEEU7-KplUfCPLd0nUu8A_Cu3m4x9Pa clientSecret=ECcLoLq-NSB0k9kVk5uNngdVC8zFTjV-_1DaJyl81C7jnzhwVI2gWFaLB8Zk-j3IKMlFBnxiSfSxkp9C
sslutil.jre=SunJSSE sslutil.protocol=TLSv1.2
service.RedirectURL=https://www.sandbox.paypal.com/webscr&cmd= service.DevCentralURL=https://developer.paypal.com
service.IPNEndpoint=https://www.sandbox.paypal.com/cgi-bin/webscr
sandbox.EmailAddress=Platform.sdk.seller@gmail.com
but i getting test facilitator's Test Store Things don't appear to be working at the moment. Please try again later.
Where is that error being returned?
Request URL:https://www.sandbox.paypal.com/webapps/hermes/api/batch/setbuyer Request Method:POST Status Code:400 Bad Request Remote Address:173.0.82.77:443 Referrer Policy:no-referrer-when-downgrade Response Headers view source Cache-Control:no-cache Content-Encoding:gzip Content-Security-Policy:default-src 'self' https://nexus.ensighten.com http://localhost.paypal.com: https://.paypal.com http://*.paypal.com https://*.paypalcorp.com https://www.paypalobjects.com https://ak1s.abmr.net https://akamai.mathtag.com https://*.akamaihd.net http://connect.facebook.net https://connect.facebook.net https://staticxx.facebook.com http://staticxx.facebook.com https://www.facebook.com https://m.facebook.com http://www.facebook.com https://*.cardinalcommerce.com 'unsafe-inline' 'unsafe-eval'; img-src ; block-all-mixed-content Content-Type:application/json; charset=utf-8 Date:Thu, 20 Jul 2017 13:14:18 GMT ETag:W/"7b9-0+fRGfn2EVcAKz2k1kwiDWFCOfs" HTTP_X_PP_AZ_LOCATOR:sandbox.slc Paypal-Debug-Id:1c299423f15aa Paypal-Debug-Id:1c299423f15aa Server:Apache Set-Cookie:tsrce=hermesnodeweb; Domain=.paypal.com; Path=/; Expires=Fri, 21 Jul 2017 13:14:20 GMT; HttpOnly; Secure Set-Cookie:tsrce=hermesnodeweb; Domain=.paypal.com; Path=/; Expires=Fri, 21 Jul 2017 13:14:20 GMT; HttpOnly; Secure Set-Cookie:LANG=en_GB%3BIN; Domain=.paypal.com; Path=/; Expires=Thu, 20 Jul 2017 22:00:15 GMT; HttpOnly Set-Cookie:X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT Set-Cookie:X-PP-SILOVER=name%3DSANDBOX3.WEB.1%26silo_version%3D1880%26app%3Dhermesnodeweb%26TIME%3D2863427673%26HTTP_X_PP_AZ_LOCATOR%3Dsandbox.slc; Expires=Thu, 20 Jul 2017 13:44:20 GMT; domain=.paypal.com; path=/; Secure; HttpOnly Set-Cookie:jIHSLr4M5Yy4U-3CrkGq73ovwuW=S23AAG0PA5zu8sERsnhf1oNhQjxw2xPqdOIPW7J2Zd9-1LRf_71qqGNgULFvYMgLdODCJIP5B-4-929rmzLnuap3H1LPjZulw; Domain=.paypal.com; Path=/; HttpOnly; Secure Set-Cookie:x-csrf-jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6IjVuZGdyOU14eVFEM0Vpbmg5TkFXcTVxMlMyamNTMzFUQkpMOWdfb0NaaFh6elVoTHpzWTI5bUV3YnpfN3VKb3pfUkRfR3BTLVhrd0IyVkJlTXVUQVZ6WWpsYXBSR3VpX0Y0YlpnLV9LYlV1WkdpczdudU1Wa0lzMmdDc21td3U4SmlZZnJEOG1XeC1jUlVmUEx4NjFMMGhfNXpsSGFQWkpYY01zc2hhVUpjcHo0b3RLYXM2U0RjVGVRNlRYOGNIRl9NMjg0MnBmaFBhZFhiQkloOTM0eDN2LS1adSIsImlhdCI6MTUwMDU1NjQ2MCwiZXhwIjoxNTAwNTYwMDYwfQ.iLLDnBF2jYQ2iFLXW4LTv80pF1I1c4QqUHici4F146s; Domain=.paypal.com; Path=/; Expires=Thu, 27 Jul 2017 13:14:20 GMT; HttpOnly; Secure Strict-Transport-Security:max-age=14400 Strict-Transport-Security:max-age=31536000; includeSubDomains; preload Transfer-Encoding:chunked Vary:Accept-Encoding X-Cnection:keep-alive, close X-Content-Type-Options:nosniff x-csrf-jwt:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6Ill6WEtoYzE0SmZhdEd5WVBvTE1QY3JxRThqQmF0RzFHSW1ZRG5aRHpUX1FUWmwyYnRleXpZbXFxcTZiaUlILXRIUFhWN0NtRklzYmxTWGl2LXdjeld1d1RVekFVQi12OFVHSi1XY09jWVplZk5yM0xxbGVKZ09ZbGhJaEJmVUNhbjg0MFZZZWRJMnNOQUQwRmFNLWVIZ29hQmczUHlwZDd1MjVVR1VKeFVIWEp0cVgtMmJLaEI3TGg1Ylk3MXNsbW11SXhJdlBmN2RKcUcyZ1prLTN0RGY3ek1qTyIsImlhdCI6MTUwMDU1NjQ2MCwiZXhwIjoxNTAwNTYwMDYwfQ.MJhyTyFdLzxIVqjzWXDxvLjQ_XvlEX0EFDndmbFVAEU x-csrf-jwt-hash:dc2daa13279ddeea5339f131f067c8d2c3468caa255f400a9423c862eaf22dcc X-Powered-By:Express X-Recruiting:If you are reading this, maybe you should be working at PayPal instead! Check out https://www.paypal.com/us/webapps/mpp/paypal-jobs X-XSS-Protection:1; mode=block Request Headers view source Accept:/* Accept-Encoding:gzip, deflate, br Accept-Language:en-US,en;q=0.8 Connection:keep-alive Content-Length:602 Content-Type:application/json;charset=UTF-8 Cookie:cookie_check=yes; Apache=10.72.108.11.1500549248082025; 44907=; YaxFiGDmmI25BOeRPokG2Tc6Hhq=mmasitgKBjmpb8SsUQjwNnphFW2k44vMs27eE-lWol4n4T1FsJeExPnb_lO7HQdAEmkYv2JUrlimYeEjZuKPum8bYefaNOcGY4Ebkm; cookie_nav_is_vt_enabled=; cookie_nav_is_uum_enabled=; HTflzB78MrylJYMtrItyt9k1zQa=M1PYWfCEGPnr0aaFH7CU7g9OtoRP_jA8EehTB7pWCGN1prdJAbS-7rVgUk--t5oDEqwRsE3xlCwJ6ORdlW1N7g07G9S; consumer_display=USER_HOMEPAGE%3d3%26USER_TARGETPAGE%3d0%26USER_FILTER_CHOICE%3d0%26BALANCE_MODULE_STATE%3d1%26GIFT_BALANCE_MODULE_STATE%3d1%26LAST_SELECTED_ALIAS_ID%3d0%26SELLING_GROUP%3d1%26PAYMENT_AND_RISK_GROUP%3d1%26SHIPPING_GROUP%3d1%26MCE2_ELIGIBILITY%3d0; rBHj97c6s31G4QOi5etwNhHHETS=SDUtiEuouUWS2JCBIWptsogz7yYFq7zmWai-es0ZKSOadLYiyTGShTUHnve; navcmd=_history-details; c9MWDuvPtT9GIMyPc3jwol1VSlO=bKrsyp6kvJmejjS7X-fQxYvnGoRlB2zu9lRHfOwfqyklM3QfOg8KsF_K622fA8E47lyK4aqM5XLffRHms_YRM8DxUpDcl2a2joGsRpQavkywvw78HdWu9lckY7TCFyN5IClm2mATHiEfPDCfMmfgX6_LWGEUtq-s7eHm4iSnlofixdgP0BTo8Y9bvG1ZU9D3NR0uDsdvuJVumElab2Oir0L3NUIPjWC36v7akiFdN0EomPvTF299grjNYolp3WxF62U9VMLsj9TWlyKwwAoTtWNlqyG4NVQ7bv1m0T36UNqoz9L4mGI92VJyR0P_UfmUxSbgiZPHwfkFjizTUdPZhrJrgYlV4aC-5oeOvu4PvRNeEkeUQQEdZQyzf622B4A6WKOUU3Qq-7Pa6SkeO-tz2d2UaHdi6KGJg3ElRcOXWMuLQbLKnhfCalok3eG; feel_cookie=a%2016%20_history-details%20b%200%20%20c%206%20webscr%20d%200%20%20e%2026%20History%2fxclick%2fDetails.xsl%20f%200%20%20g%205%20en_GB%20h%200%20%20i%2013%20p%2fxcl%2fdetails%20j%200%20%20k%2039%20PayPal%20Website%20Payment%20Details%20-%20PayPal%20l%200%20%20; navlns=0.0; s_pers=%20s_fid%3D53005BB16D6F5327-3D0B713679EBC36A%7C1563621297341%3B%20gpv_c43%3Dp%252Fxcl%252Fdetails%253A%253A_history-details%7C1500551097345%3B%20gpv_events%3Dno%2520value%7C1500551097351%3B; s_sess=%20s_cc%3Dtrue%3B%20v31%3Dp%252Fxcl%252Fdetails%253A%253A_history-details%3B%20tr_p1%3Dp%252Fxcl%252Fdetails%253A%253A_history-details%3B%20lt%3D%3B%20s_sq%3D%3B%20s_ppv%3D84%3B; X-PP-K=1500550469:5:NA; SEGM=; KHcl0EuY7AKSMgfvHl7J5E7hPtK=rgYhhlKUbiaheqok3i8HesX-3N93Aj0IwwiZ2T6i67uf1CkJSYHpFsRPAPSljHujqouBBuE_yx1eA5_G; x-pp-p=290emqtwIJNu9g16oqMXpqjc.WLQ0aH2MXRklJPevui2GVy3mrQxCSkeRkZe4WoiMmtUt4Mi0oxCT9AXZDoP8Aka3k-d74l15pbVO4wj58HlcsIWHpNb-K2GLjGpH6ovX3kI4q4uZNcvxmrbJoR5JSjRwjXBFmQ99V3rSj7abX9rW0HxBVjolsKp.G43Sdn46vM7vYAP2SwwCuVo9MRzoA7gkQXccBa3bqXBjeuxffbj-c3AB7WOj4guO568Smur; DPz73K5mY4nlBaZpzRkjI3ZzAY3QMmrP=S23AAGnpdVAtW0VBZowz-UOs2JDOicGqEjeHG9CxGNl443DbMlb4FJR2ESgko2K5YBghcuiplgvg-hMw-Z_tt-pJW4NTRys4w; AV894Kt2TSumQQrJwe-8mzmyREO=S23AAGnpdVAtW0VBZowz-UOs2JDOicGqEjeHG9CxGNl443DbMlb4FJR2ESgko2K5YBghcuiplgvg-hMw-Z_tt-pJW4NTRys4w; _ga=GA1.2.1711714103.1500549245; rmuc=; nsid=s%3Aag3R8hr3r8eUhw9St_BJ7sXnId5lqjWd.CwsOoVlvmqL2crcq4Vapw2GfP8RH5lGtGpNv8qEqZlg; login_email=akhilpothula007-buyer%40gmail.com; fn_dt=EC-8Y365978K5499002Y; -1ILhdyICORs4hS4xTUr41S8iP0=PFh_jafmaTPjxIPFw3O1Ymd9FrlLcenj8vengjaqS1UDqMTSiL-TTAIOd5C51fS-lo7_29QFi1aYFRGr; id_token=idtoken6a2095f691004ed0b2c17c2137395eb9; ui_experience=login_type%3DEMAIL_PASSWORD%26ot_terms_shown%3Dtrue%26home%3D3; X-PP-ADS=AToBiaJwWQeJ6QPCbbIF7YrIaBSgWS07AdqicFn-dIFl.ryELs4.QKdJ6nMOOwEhq3BZQnzsx7NfiICOjLFE4FX3Ow; Tv7XaFXkAfcLyjkmtYddHHs5nwS=IWzBfKxbVkBFeQJ-406cDx7JTouTSFB3VmQJOlvvHGu4CS5u0vH04E6hVr1uFMNT0syER3xsgzS08IeNdh2QmePGeuZmGi2Jqlgmz18mDM9Yc6-7KOf66FcawCj-FdrTXm; x-pp-s=eyJ0IjoiMTUwMDU1NjA2NjcyMCIsIm0iOiIwIn0; ts=vreXpYrS%3D1595227210%26vteXpYrS%3D1500558233%26vr%3D5fb4771315dac1c44ddb84f2ffff9e84%26vt%3D5fb4772b15dac1c44ddb84f2ffff9e83; jIHSLr4M5Yy4U-3CrkGq73ovwuW=S23AAG0PA5zu8sERsnhf1oNhQjxw2xPqdOIPW7J2Zd9-1LRf_71qqGNgULFvYMgLdODCJIP5B-4-929rmzLnuap3H1LPjZulw; LANG=en_IN%3BIN; tsrce=hermesnodeweb; x-csrf-jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6InF1WGxwNmNlRE9QRGZNQnE3Sm9NMjk2RV9QcjZ1STYxUzJIWkp5c3hEdkVmZVg3LVRJOVJaWXZxNlJPZ1pzU3NtYXhNVnhKZzM3UFVHYzZZMTluR0FBMTBoY3dWQmZ0SUh0X3FjS04wSzd3UjhWMnE0QlVZNm50SHpFamE3cjlkVkI0VGZ4X0x3X05Yd1F0S1hOWTBPOUUxaGdmQlVXbWJhTWNSbWVGTGllQmU5WXBiVTJSWWlLc0NHNFhKQWZJQW1lYVAzdWJQaUpPTEh1enBWd0JkMkgzbXFTOCIsImlhdCI6MTUwMDU1NjQ1NywiZXhwIjoxNTAwNTYwMDU3fQ.DMaZ1KLNLtl7CPsFrXeTRmQQk2uuNKPkb2AFBhK41oI; X-PP-SILOVER=name%3DLIVE3.APIC.1%26silo_version%3D880%26app%3Driskclientmetadatapiserv_apic%26TIME%3D2846650457%26HTTP_X_PP_AZ_LOCATOR%3Dslcb.slc Host:www.sandbox.paypal.com Origin:https://www.sandbox.paypal.com Referer:https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-88169203MD9673909 User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 x-csrf-jwt:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6IlJicjl5ZmloaWd1X1dKMXBhbExMQklUVmI5V3pIVDNwanZwWW9wenEtN01CZHZ5ZDNQMzFQZUEzbkRnNFp3RllPb1lfVVpFOVplUDlQRVZyV2E3dTF1RWItbWJRLWhrV19wVUFaRFMxdC1TT2dwRURRVlFpRWFnajJQSXhLSHBOcTJ0c3NLY2ItQ09ERUstN3BlTms1a0VZdUJxVUg3MzIzV2NDRVViTGhFV25HeHlvSjRuRkZEaU8tOVM5aHY3bWFJbUZhbEx2djFBc1dPWkhpcDNHWS1EUUlPSyIsImlhdCI6MTUwMDU1NjQ1NywiZXhwIjoxNTAwNTYwMDU3fQ.w4AiR-7ox4jIN-z5e_ia_7-ZGlQesk_JJC-rg6ieoLc X-Requested-With:XMLHttpRequest
please tell me how can i fix this . i did not any idea about this
Will work with you on the other issue you created.
General information
PayPal-Debug-ID
values:Issue description
how to get paypal payament details in my local database in java