Issue with paypal payment gateway
I am currently using com.paypal.sdk:paypal-android-sdk:2.16.0
this library.
I was testing my application. I noticed that I can test my application via sandbox paypal account
But, I can't login/pay by my personal(real) account of paypal.
Here is my source code https://github.com/Istiakshovon/payment_gateway/
See also questions close to this topic
- How to make Navigation drawer like this?
-
URL resource = this.getClass().getResource("file-name") is null
Completely puzzled. I do:
URL resource = this.getClass().getResource("eye-visible.png");
and the URL evaluates to null. "eye-visible.png" is a file in the same package as my class, which is "Controller.java":
I also tried (actually I started with this):
InputStream inputStream = Controller.class.getResourceAsStream("eye-visible.png");
and this returns null as well.
Really stuck - any clue??
This is a modular project and I run on the JDK14. I use NetBeans for an IDE. The lines above are in the start method of a JavaFX application. I reproduced the same null output with the lines above, in a new java project that has just a main class: same effect.
-
Enums Switch Statement for Type
public enum Black { BLACK,WHITE; private boolean BLACK() { boolean b = true; switch(this) { case BLACK: return true; case WHITE: return false; } return b; } }
For the above code, I am trying to check if my enum is "BLACK", or "WHITE". However, I tried debugging this and when I have an instance of "BLACK", in the switch statements, both cases evaluate to true. What am I doing wrong and how can I fix this?
-
Why my App dont work with TargetVersion 30?
When im trying to use targetversion 30 the emulator cant display my App. At lower targetversions like 27 everything works. My problem is that it should work on target version 30 with android 11 (R). I dont want to downgrate my targetversion there must be a solution that it also worked with targetversion higher then 27.
My logcat:
021-01-22 18:22:54.567 1213-2837/com.google.android.gms E/NetRec: [185] akiy.a: Could not retrieve server token for package com.google.android.apps.gcs java.util.concurrent.ExecutionException: rey: 29503: at auct.b(:com.google.android.gms@201817023@20.18.17 (040800-311416286):5) at auct.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):23) at akiy.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):1) at akiy.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):4) at akix.getHeaders(:com.google.android.gms@201817023@20.18.17 (040800-311416286):2) at com.android.volley.toolbox.HttpClientStack.performRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):18) at sdq.performRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):1) at bqg.executeRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):1) at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):9) at sdr.performRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):14) at com.android.volley.NetworkDispatcher.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):6) at com.android.volley.NetworkDispatcher.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):2) Caused by: rey: 29503: at rkl.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):4) at anfv.b(:com.google.android.gms@201817023@20.18.17 (040800-311416286):3) at angn.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):8) at zus.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):17) at blot.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):2) at sji.b(:com.google.android.gms@201817023@20.18.17 (040800-311416286):12) at sji.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):7) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at spj.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):0) at java.lang.Thread.run(Thread.java:923) 2021-01-22 18:22:54.648 1213-2837/com.google.android.gms E/Volley: [185] BasicNetwork.performRequest: Unexpected response code 400 for https://mobilenetworkscoring-pa.googleapis.com/v1/GetWifiQuality?key=AIzaSyBrlVtd67QvwS_Wz0Do4ZIdOeA6ThtVczU 2021-01-22 18:23:25.064 1213-2840/com.google.android.gms E/NetRec: [188] akiy.a: Could not retrieve server token for package com.google.android.apps.gcs java.util.concurrent.ExecutionException: rey: 29503: at auct.b(:com.google.android.gms@201817023@20.18.17 (040800-311416286):5) at auct.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):23) at akiy.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):1) at akiy.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):4) at akix.getHeaders(:com.google.android.gms@201817023@20.18.17 (040800-311416286):2) at com.android.volley.toolbox.HttpClientStack.performRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):18) at sdq.performRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):1) at bqg.executeRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):1) at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):9) at sdr.performRequest(:com.google.android.gms@201817023@20.18.17 (040800-311416286):14) at com.android.volley.NetworkDispatcher.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):6) at com.android.volley.NetworkDispatcher.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):2) Caused by: rey: 29503: at rkl.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):4) at anfv.b(:com.google.android.gms@201817023@20.18.17 (040800-311416286):3) at angn.a(:com.google.android.gms@201817023@20.18.17 (040800-311416286):8) at zus.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):17) at blot.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):2) at sji.b(:com.google.android.gms@201817023@20.18.17 (040800-311416286):12) at sji.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):7) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at spj.run(:com.google.android.gms@201817023@20.18.17 (040800-311416286):0) at java.lang.Thread.run(Thread.java:923) 2021-01-22 18:23:25.185 1213-2840/com.google.android.gms E/Volley: [188] BasicNetwork.performRequest: Unexpected response code 400 for https://mobilenetworkscoring-pa.googleapis.com/v1/GetWifiQuality?key=AIzaSyBrlVtd67QvwS_Wz0Do4ZIdOeA6ThtVczU
Please help me.
-
Can't change the "in call" icons color in SamsungInCallUI.apk
icons to changeI have rooted note 8 N950F pie with deluxe rom and I try to color the "in call" icons from white to red.
what I did was to change some parameters in
colors.xml
(SamsungInCallUI/res/values/colors.xml
).The Parameters I changed are:
<color name="call_card_element_color_default">#ffff0000</color> <color name="call_card_state_sub_text_color">#ffff0000</color> <color name="incall_button_checked_disabled_tint">#66008000</color> <color name="incall_button_checked_tint">#ff008000</color> <color name="incall_button_default_tint">#ffff0000</color> <color name="incall_button_disabled_text">#66ff0000</color> <color name="incall_button_disabled_tint">#66ff0000</color> <color name="incall_button_text">#ffff0000</color> <color name="incoming_call_default_text_color">#ffff0000</color>
but there is no effect on the color.
Please can anyone can tell me what I need to do?
Thanks.
-
Could you suggest plugin for PayPal Donations?
Good afternoon. Maybe someone has used PayPal donation plugin (paid or free) that meets the requirements:
- User fills in Email, Amount, and Comment fields
- Clicks on Pay that goes to PayPal payment.
- The visitor gets a custom Receipt after the payment is already made.
- Receipts have to be editable in admin-panel.
Thanks!
-
Accept credit card and debit card payment using paypal in nodejs rest api
I have used paypal-rest-sdk in my code the payment using paypal login working smoothly but now I want to pay using credit card and debit card without login to paypal.
I have also on the "PayPal Account Optional" to "on" stil I am not able to pay with credit and debit cards
Below is the image of login window of paypal. I want to pay with pay with debit card and credit card button.
I have create two routes for create payment and execute payment. I have used nodejs for back-end and angular8 for front-end.
Can you please help me here
-
How do I redirect a user to a website after a purchase using PayPal smart buttons?
onApprove: function(data, actions) { return actions.order.capture().then(function(details) { alert('Transaction completed by ' + details.payer.name.given_name + '!'); location.href("mywebsite"); }); },
I have been trying to find out how to do this for awhile, I have tried "location.replace" as well, but it still didn't work. This is just the basic code that you get when you create a PayPal smart button, all I added was "location.href", but it won't redirect me. I will try my best to answer any questions! Any help on this matter is appreciated!
-
How to write a code that validates the credit card expiry date
<?php session_start(); $_SESSION['err'] = 1; foreach($_POST as $key => $value){ if(trim($value) == ''){ $_SESSION['err'] = 0; } break; } if($_SESSION['err'] == 0){ header("Location: checkout.php"); } else { unset($_SESSION['err']); } $_SESSION['ship'] = array(); foreach($_POST as $key => $value){ if($key != "submit"){ $_SESSION['ship'][$key] = $value; } } require_once "./functions/database_functions.php"; // print out header here $title = "Purchase"; require "./template/header.php"; // connect database if(isset($_SESSION['cart']) && (array_count_values($_SESSION['cart']))){ ?> <table class="table"> <tr> <th>Item</th> <th>Price</th> <th>Quantity</th> <th>Total</th> </tr> <?php foreach($_SESSION['cart'] as $isbn => $qty){ $conn = db_connect(); $book = mysqli_fetch_assoc(getBookByIsbn($conn, $isbn)); ?> <tr> <td><?php echo $book['book_title'] . " by " . $book['book_author']; ?></td> <td><?php echo "₹" . $book['book_price']; ?></td> <td><?php echo $qty; ?></td> <td><?php echo "₹" . $qty * $book['book_price']; ?></td> </tr> <?php } ?> <tr> <th> </th> <th> </th> <th><?php echo $_SESSION['total_items']; ?></th> <th><?php echo "₹" . $_SESSION['total_price']; ?></th> </tr> <tr> <td>Shipping</td> <td> </td> <td> </td> <td>20.00</td> </tr> <tr> <th>Total Including Shipping</th> <th> </th> <th> </th> <th><?php echo "₹" . ($_SESSION['total_price'] + 20); ?></th> </tr> </table> <form method="post" action="process.php" class="form-horizontal"> <?php if(isset($_SESSION['err']) && $_SESSION['err'] == 1){ ?> <p class="text-danger">All fields have to be filled</p> <?php } ?> <div class="form-group"> <label for="card_type" class="col-lg-2 control-label">Type</label> <div class="col-lg-10"> <select class="form-control" name="card_type"> <option value="VISA">VISA</option> <option value="MasterCard">MasterCard</option> <option value="American Express">Pay Balance</option> </select> </div> </div> <div class="form-group"> <label for="card_number" class="col-lg-2 control-label">Card Number*</label> <div class="col-lg-10"> <input type="text" class="form-control" name="card_number"> </div> </div> <div class="form-group"> <label for="CVV" class="col-lg-2 control-label">CVV*</label> <div class="col-lg-10"> <input type="password" class="form-control" name="CVV"> </div> </div> <div class="form-group"> <label for="card_expire" class="col-lg-2 control-label">Expiry Date*</label> <div class="col-lg-10"> <input type="month" name="card_expire" class="form-control"> </div> </div> <div class="form-group"> <label for="card_owner" class="col-lg-2 control-label">Card Name*</label> <div class="col-lg-10"> <input type="text" class="form-control" name="card_owner"> </div> </div> <div class="form-group"> <div class="col-lg-10 col-lg-offset-2"> <button type="reset" class="btn btn-default">Cancel</button> <button type="submit" class="btn btn-primary">Purchase</button> </div> </div> </form> <p class="lead">Please press Purchase to confirm your purchase, or Continue Shopping to add or remove items.</p> <?php } else { echo "<p class=\"text-warning\">Your cart is empty! Please make sure you add some books in it!</p>"; } if(isset($conn)){ mysqli_close($conn); } require_once "./template/footer.php"; ?>
I'm trying to write a code that will reject the payment if the expiry of the credit card is not valid according to the current date.
-
Can we integrate CCAvenue with ReactJs and cakePHP as backend how will they communicate?
const nodeCCAvenue = require('node-ccavenue'); const ccav = new nodeCCAvenue.Configure({ merchant_id: process.env.merchant_id, working_key: process.env.test_working_key || process.env.prod_working_key, }); ccavenue.makePayment(); console.log(ccavenue); const encryptedOrderData = ccav.getEncryptedOrder(orderParams); console.log(encryptedOrderData); axios.post(API_ENDPOINT, (req, res) => { console.log('request ===>>>', req); const { encResp } = req.body; const decryptedJsonResponse = ccav.redirectResponseToJson(encResp); // To check order_status: - console.log(decryptedJsonResponse); }) .then(r => console.log(r));
the above code is from node-ccavenue library and is throwing error. Any specific reference for reactjs integration?
-
Retrieve Credit Card Artwork
ApplePay retrieve the artwork of a credit card when a card is registered for use. Is it possible to replicate this process from card details alone and if so, how.
-
SandBox Not Showing Images
I am doing a little test for an app in SandBox and some images are not showing up. If you go to the link below (the app only works in fullscreen for now) you can click on "Game", then click any difficulty, and the cards will not have backs to them because the images aren't showing up. If you click the card, it flips and you can see those images. The CSS linked to the back of the card is under "game.scss" (.back). Any idea why it is not showing up? (the images do work in vscode just not SandBox). Here is the link: https://codesandbox.io/s/cranky-mahavira-97wew?file=/src/styles/app.scss
-
Server-side generated client-side Javascript sandbox
I currently have a sandbox that runs client-side using the
with
+proxy
technique, but I want to move all the templating to server-side rendering, both to relieve pressure on the clients' machines as to be able to make my CSP more strict.However I can't just move over my "sandboxed code generator" to the server and call it a day, as all my server-side code is in strict mode, ergo no
with
, ergo no sandbox.Is there any way for me to make sure that code in templates only do what they should do? Without writing a custom parser, absolutely not going to do that.
-
Unable to launch electron login page through node-sp-auth on CentOS
Electron fails with no-sandbox using in node-sp-auth in centOS with the following error
Command failed: electron usr/share/nginx/PROJECT_NAME/node_modules/node-sp-auth/lib/src/auth/resolvers/OnDemand/electron/main.js -- https://xxx.sharepoint.com/sites/XXXXXXXXXXXX false 27904:0120/123437.257908:FATAL:electron_main_delegate.cc(264)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180. /usr/lib/node_modules/electron/dist/electron exited with signal SIGTRAP
NodeJS - 12.18.3 node-sp-auth - 3.0.1 CentOS - 8.3.2011