Commit 2f5009ed authored by Nastuzzi Samy's avatar Nastuzzi Samy
Browse files

One purchase by one

parent 84bb5858
......@@ -351,11 +351,14 @@ public class ArticleGroupActivity extends BaseActivity {
protected void pay(final String badgeId) {
dialog.startLoading(this, getResources().getString(R.string.paiement), getResources().getString(R.string.transaction_in_progress));
final List<Integer> articleList = panier.getArticleList();
clearPanier();
new Thread() {
@Override
public void run() {
try {
nemopaySession.setTransaction(badgeId, panier.getArticleList());
nemopaySession.setTransaction(badgeId, articleList);
Thread.sleep(100);
runOnUiThread(new Runnable() {
......@@ -365,7 +368,6 @@ public class ArticleGroupActivity extends BaseActivity {
Toast.makeText(ArticleGroupActivity.this, "Paiement effectué", Toast.LENGTH_LONG).show();
setBackgroundColor(getResources().getColor(R.color.success));
((Vibrator) getSystemService(ArticleGroupActivity.VIBRATOR_SERVICE)).vibrate(250);
clearPanier();
}
});
} catch (final Exception e) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment