מה ההסבר לשגיאה הזו בסליקת אשראי ב API
-
תודה @yossiz
אכן תיקנתי את " במקום שהיה צריך וגם את הסלשים הורדתי
ועדיין נותן לי שגיאה - אמנם אחרת אבל אשמח לעזרהCannot POST /api/api_transaction/request
-
@yossiz
אכן כשהרצתי את הפקודה החזרתי אותם
ובשלב הזה זה נתן לי את השגיאה הנ"לככה זה נראה
curl -X POST 'https://apidev.payplus.co.il/api/api_transaction/request' -H 'Content-Type: application/json' -H 'token: $token' -d '{ \"cashier\": \"01\", \"request\": { \"credit_card\": \"1234123412341234\", \"exp_mm\": \"11\", \"exp_yy\": \"21\", \"cvv\": \"000\", \"auth_number\": \"000000\", \"holder\": { \"id\": \"123123123\" }, \"beneficiary\": { \"name\": \"יוסי\", \"email\": \"test@test.com\", \"phone\": \"054-7123123\", \"crn\": \"123123123\" }, \"amount\": \"10\", \"currency\": \"ILS\", \"payments\": { \"number\": \"1\", \"first_amount\": \"10\", \"nonfirst_amount\": \"null\" }, \"transaction_type\": \"01\", \"paramJ\": \"4\", \"block_duplicate_transaction\": \"false\", \"comment\": \"comment\", \"crdit_terms\": \"1\", \"print_comment\": \"comment\", \"items\": [ { \"details\": \"internet payment\", \"price_per_unit\": \"2\", \"amount\": \"5\" } ], \"invoice\": { \"customer_number\": \"123123123\", \"description\": \"invoice description\" } } }'
האם ייתכן שהטוקן בכותרת לא עובר נכון ?
-
@yossiz
אכן כשהרצתי את הפקודה החזרתי אותם
ובשלב הזה זה נתן לי את השגיאה הנ"לככה זה נראה
curl -X POST 'https://apidev.payplus.co.il/api/api_transaction/request' -H 'Content-Type: application/json' -H 'token: $token' -d '{ \"cashier\": \"01\", \"request\": { \"credit_card\": \"1234123412341234\", \"exp_mm\": \"11\", \"exp_yy\": \"21\", \"cvv\": \"000\", \"auth_number\": \"000000\", \"holder\": { \"id\": \"123123123\" }, \"beneficiary\": { \"name\": \"יוסי\", \"email\": \"test@test.com\", \"phone\": \"054-7123123\", \"crn\": \"123123123\" }, \"amount\": \"10\", \"currency\": \"ILS\", \"payments\": { \"number\": \"1\", \"first_amount\": \"10\", \"nonfirst_amount\": \"null\" }, \"transaction_type\": \"01\", \"paramJ\": \"4\", \"block_duplicate_transaction\": \"false\", \"comment\": \"comment\", \"crdit_terms\": \"1\", \"print_comment\": \"comment\", \"items\": [ { \"details\": \"internet payment\", \"price_per_unit\": \"2\", \"amount\": \"5\" } ], \"invoice\": { \"customer_number\": \"123123123\", \"description\": \"invoice description\" } } }'
האם ייתכן שהטוקן בכותרת לא עובר נכון ?
-
@yossiz אני משתמש בזה בתוך php
הקוד נראה כך<?php $login = shell_exec(" curl -X POST 'https://apidev.payplus.co.il/api/api_users/login' -H 'Content-Type: application/json' -d '{ \"email\": \"test@payplus.co.il\", \"apiKey\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" }' "); $deta = json_decode($login); $token = $deta -> token; print shell_exec(" curl -X POST 'https://apidev.payplus.co.il/api/api_transaction/request' -H 'Content-Type: application/json' -H 'token: $token' -d '{ \"cashier\": \"01\", \"request\": { \"credit_card\": \"1234123412341234\", \"exp_mm\": \"11\", \"exp_yy\": \"21\", \"cvv\": \"000\", \"auth_number\": \"000000\", \"holder\": { \"id\": \"123123123\" }, \"beneficiary\": { \"name\": \"יוסי\", \"email\": \"test@test.com\", \"phone\": \"054-7123123\", \"crn\": \"123123123\" }, \"amount\": \"10\", \"currency\": \"ILS\", \"payments\": { \"number\": \"1\", \"first_amount\": \"10\", \"nonfirst_amount\": \"null\" }, \"transaction_type\": \"01\", \"paramJ\": \"4\", \"block_duplicate_transaction\": \"false\", \"comment\": \"comment\", \"crdit_terms\": \"1\", \"print_comment\": \"comment\", \"items\": [ { \"details\": \"internet payment\", \"price_per_unit\": \"2\", \"amount\": \"5\" } ], \"invoice\": { \"customer_number\": \"123123123\", \"description\": \"invoice description\" } } }' "); print "</p>".$token;
תודה על העזרה
-
@yossiz אני משתמש בזה בתוך php
הקוד נראה כך<?php $login = shell_exec(" curl -X POST 'https://apidev.payplus.co.il/api/api_users/login' -H 'Content-Type: application/json' -d '{ \"email\": \"test@payplus.co.il\", \"apiKey\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" }' "); $deta = json_decode($login); $token = $deta -> token; print shell_exec(" curl -X POST 'https://apidev.payplus.co.il/api/api_transaction/request' -H 'Content-Type: application/json' -H 'token: $token' -d '{ \"cashier\": \"01\", \"request\": { \"credit_card\": \"1234123412341234\", \"exp_mm\": \"11\", \"exp_yy\": \"21\", \"cvv\": \"000\", \"auth_number\": \"000000\", \"holder\": { \"id\": \"123123123\" }, \"beneficiary\": { \"name\": \"יוסי\", \"email\": \"test@test.com\", \"phone\": \"054-7123123\", \"crn\": \"123123123\" }, \"amount\": \"10\", \"currency\": \"ILS\", \"payments\": { \"number\": \"1\", \"first_amount\": \"10\", \"nonfirst_amount\": \"null\" }, \"transaction_type\": \"01\", \"paramJ\": \"4\", \"block_duplicate_transaction\": \"false\", \"comment\": \"comment\", \"crdit_terms\": \"1\", \"print_comment\": \"comment\", \"items\": [ { \"details\": \"internet payment\", \"price_per_unit\": \"2\", \"amount\": \"5\" } ], \"invoice\": { \"customer_number\": \"123123123\", \"description\": \"invoice description\" } } }' "); print "</p>".$token;
תודה על העזרה
-
@yossiz אני משתמש בזה בתוך php
הקוד נראה כך<?php $login = shell_exec(" curl -X POST 'https://apidev.payplus.co.il/api/api_users/login' -H 'Content-Type: application/json' -d '{ \"email\": \"test@payplus.co.il\", \"apiKey\": \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\" }' "); $deta = json_decode($login); $token = $deta -> token; print shell_exec(" curl -X POST 'https://apidev.payplus.co.il/api/api_transaction/request' -H 'Content-Type: application/json' -H 'token: $token' -d '{ \"cashier\": \"01\", \"request\": { \"credit_card\": \"1234123412341234\", \"exp_mm\": \"11\", \"exp_yy\": \"21\", \"cvv\": \"000\", \"auth_number\": \"000000\", \"holder\": { \"id\": \"123123123\" }, \"beneficiary\": { \"name\": \"יוסי\", \"email\": \"test@test.com\", \"phone\": \"054-7123123\", \"crn\": \"123123123\" }, \"amount\": \"10\", \"currency\": \"ILS\", \"payments\": { \"number\": \"1\", \"first_amount\": \"10\", \"nonfirst_amount\": \"null\" }, \"transaction_type\": \"01\", \"paramJ\": \"4\", \"block_duplicate_transaction\": \"false\", \"comment\": \"comment\", \"crdit_terms\": \"1\", \"print_comment\": \"comment\", \"items\": [ { \"details\": \"internet payment\", \"price_per_unit\": \"2\", \"amount\": \"5\" } ], \"invoice\": { \"customer_number\": \"123123123\", \"description\": \"invoice description\" } } }' "); print "</p>".$token;
תודה על העזרה
-
@yossiz אמר במה ההסבר לשגיאה הזו בסליקת אשראי ב API:
הבקשה
@yossiz
ממש תודה
אכן אנסה (-אנסה שוב, האמת מהבוקר אני מחכה לשיחה חוזרת מהם)@יוס אגב, יש שגיאה נוספת ב-JSON.
{ "credit_card": "1234123412341234", "exp_mm": "11", "exp_yy": "21", "cvv": "000", "auth_number": "000000", "holder": { "id": "123123123" }
צ"ל:
{ "credit_card": { "number" : "1234123412341234", "exp_mm": "11", "exp_yy": "21", "cvv": "000", "auth_number": "000000", "holder": { "id": "123123123" } }
אבל לא נראה לי שתיקון דבר זה יפתור את הבעיה
עריכה: עכשיו אני רואה שיש סתירה בנושא בין התיעוד לבין הדוגמה שם בדף...
-
@יוס עד כמה שאני מצליח להבין הבקשה היא בסדר, בשלב זה הייתי מנסה את התמיכה שלהם (אם המושג "תמיכה" קיים אצלם...)
@yossiz אמר במה ההסבר לשגיאה הזו בסליקת אשראי ב API:
@יוס עד כמה שאני מצליח להבין הבקשה היא בסדר, בשלב זה הייתי מנסה את התמיכה שלהם (אם המושג "תמיכה" קיים אצלם...)
עכשיו יצרתי איתם קשר
וזה התשובה
"החלפנו שרתים לכן מסוף הטסט לא עובד תנסה במסוף אמת"
(די מרגיז לעבוד שעות כדי לגלות כזה שטות)ומסוף האמת גם לא עובד -זה בבדיקה