Monday, May 16, 2011
Create Credit Card in Oracle Payments using API (IBY_FNDCPT_SETUP_PUB.CREATE_CARD)
Below script will help you to create a credit card details in IBY_CREDITCARD table using the API IBY_FNDCPT_SETUP_PUB.CREATE_CARD
Test Instance: R12.1.1
Parameters:
CREDITCARD_REC_TYPE | Meaning |
Owner_Id | Owner TCA Party ID |
Card_Holder_Name | Name of the card holder as mentioned on the card |
Billing_Address_Id | Party Site Id (of a Party Site created previously) linking the Owner_Id (above) and a Location Id containing the Billing Address for the CC. The Party Site must have a created Party Site Use (BILL_TO) before invoking the API. |
Card_Number: | The number of the credit card |
Expiration_Date | Expiration date of the card |
Instrument_Type | Must be 'CREDITCARD' |
PurchaseCard_Flag | N' if a CC, 'Y' if a PC. |
Card_Issuer | VISA', 'MASTERCARD', 'AMEX', etc… Note: 'UNKNOWN' credit card type will bypass CC number validation. |
Single_Use_Flag | allways set to 'N' |
Info_Only_Flag | allways set to 'N', otherwise the CC wont be usable for Payments |
SCRIPT:
DECLARE
l_return_status VARCHAR2 (1000);
l_msg_count NUMBER;
l_msg_data VARCHAR2 (4000);
l_card_id NUMBER;
l_msg_data_out VARCHAR2 (240);
l_mesg VARCHAR2 (240);
p_count NUMBER;
l_response iby_fndcpt_common_pub.result_rec_type;
l_card_instrument iby_fndcpt_setup_pub.creditcard_rec_type;
v_context VARCHAR2 (10);
FUNCTION set_context (
i_user_name IN VARCHAR2,
i_resp_name IN VARCHAR2,
i_org_id IN NUMBER
)
RETURN VARCHAR2
IS
BEGIN
NULL;
-- Inorder to reduce the content of the post I moved the implementation part of this function to another post and it is available here
END set_context;
BEGIN
DBMS_OUTPUT.put_line ('1');
--1. Set applications context if not already set.
v_context := set_context ('&username', '&resp_name', '&org_id');
IF v_context = 'F'
THEN
DBMS_OUTPUT.put_line ('Error while setting the context');
END IF;
DBMS_OUTPUT.put_line ('2');
mo_global.init ('IBY');
l_card_instrument.owner_id := 51426;
l_card_instrument.card_holder_name := Share Oracle Apps';
l_card_instrument.billing_address_id:= NULL;
l_card_instrument.card_number := '5011478596211882';
l_card_instrument.expiration_date := '21-OCT-2011';
l_card_instrument.instrument_type := 'CREDITCARD';
l_card_instrument.purchasecard_flag := 'N';
l_card_instrument.card_issuer := 'VISA';
l_card_instrument.single_use_flag := 'N';
l_card_instrument.info_only_flag := 'N';
l_card_instrument.card_purpose := 'N';
l_card_instrument.card_description := 'Card for Testing';
l_card_instrument.active_flag := 'Y';
IBY_FNDCPT_SETUP_PUB.CREATE_CARD
(p_api_version => 1.0,
x_return_status => l_return_status,
x_msg_count => l_msg_count,
x_msg_data => l_msg_data,
p_card_instrument => l_card_instrument,
x_card_id => l_card_id,
x_response => l_response,
p_init_msg_list => fnd_api.g_true,
p_commit => fnd_api.g_false
);
DBMS_OUTPUT.put_line ('l_return_status = ' || l_return_status);
DBMS_OUTPUT.put_line ('l_msg_count = ' || l_msg_count);
DBMS_OUTPUT.put_line ('l_card_id = ' || l_card_id);
DBMS_OUTPUT.put_line ('l_response.Result_Code = ' ||
l_response.result_code);
DBMS_OUTPUT.put_line ( 'l_response.Result_Category = '
|| l_response.result_category
);
DBMS_OUTPUT.put_line ( 'l_response.Result_Message = '
|| l_response.result_message
);
IF l_msg_count = 1
THEN
DBMS_OUTPUT.put_line ('l_msg_data ' || l_msg_data);
ELSIF l_msg_count > 1
THEN
LOOP
p_count := p_count + 1;
l_msg_data := fnd_msg_pub.get (fnd_msg_pub.g_next, fnd_api.g_false);
IF l_msg_data IS NULL
THEN
EXIT;
END IF;
DBMS_OUTPUT.put_line ('Message' || p_count || ' ---' || l_msg_data);
END LOOP;
END IF;
END;
Do you think this Article is useful?
Subscribe to:
Post Comments (Atom)
Disclaimer
The ideas, thoughts and concepts expressed here are my own. They, in no way reflect those of my employer or any other organization/client that I am associated. The articles presented doesn't imply to any particular organization or client and are meant only for knowledge Sharing purpose. The articles can't be reproduced or copied without the Owner's knowledge or permission.
19 Responses to “Create Credit Card in Oracle Payments using API (IBY_FNDCPT_SETUP_PUB.CREATE_CARD)”
September 30, 2013 at 8:05 AM
Hi, Thanks for the program, I just ran the program but i don't see the record in IBY_CREDITCARD table. We are on 12.1.3. Is there any other program that i need to run after this script?
Thanks.
Raj.
March 26, 2019 at 4:01 AM
You have a real ability for writing unique content. I like how you think and the way you represent your views in this article. I agree with your way of thinking. Thank you for sharing. 650 credit score good
April 4, 2019 at 11:30 PM
This type of message always inspiring and I prefer to read quality content, so happy to find good place to many here in the post, the writing is just great, thanks for the post. Bank Alfalah Credit Card in Karachi - HBL Credit Card
April 12, 2019 at 5:57 AM
Really impressive stuff of writing. I was looking for this type of blog and i really appreciate your effort. Keep it up dear. zameen for you
April 20, 2019 at 12:40 AM
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often. click for complete info
May 21, 2019 at 10:55 AM
Attractive, post. I just stumbled upon your weblog and wanted to say that I have liked browsing your blog posts. Rental Receipt Form Template
June 16, 2019 at 10:45 AM
Very good article and thanks for sharing such information. Already Read your Recent Post, its Great Thanks wedding budget | employee warning notice | reserved sign | weight loss competition | medical release
October 1, 2019 at 1:01 AM
Interesting and helpful post and i appreciate you for this. Keep sharing. study in turkey
December 20, 2019 at 5:19 AM
Hi, I find reading this article a joy. It is extremely helpful and interesting and very much looking forward to reading more of your work
June 28, 2020 at 1:53 AM
This is a great experience of why the financial market monetarists have it right. Inflation is not a useful measure to guide financial policy. Thanks for sharing, bitcoin scams
August 19, 2020 at 11:05 PM
Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info.Fantastic nice. I appreciate this post. 소액결제 현금화
May 30, 2021 at 12:37 AM
Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! american express credit card payment
May 31, 2021 at 7:25 AM
Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. CRED invite link
June 27, 2021 at 11:06 AM
New site is solid. A debt of gratitude is in order for the colossal exertion. cupo dolares
June 29, 2021 at 10:34 PM
Before you can financing a small business, a task, an expansion or an acquisition, you have to build exactly what your money wants are. https://www.accreditloan.com/
September 14, 2021 at 11:24 PM
It is a good and helpful for international students and i appreciate you for this blog. Highbrow international
January 27, 2022 at 11:56 PM
What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much. Givingarea
February 1, 2022 at 11:37 PM
This is the prevalent norm nowadays. To do so, it is necessary that the business employs the services of a merchant service provider to set up the systems that will enable it to accept such payments. How to become a Merchant Service Provider
June 13, 2022 at 7:50 AM
After the code where do you expect the data to appear. As I cannot see the record in IBY_CREDITCARD table. We are on 12.2.10 Is there any other program that i need to run after this script? The question was asked before by Raj.
Thanks.
Post a Comment